For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/genui/a2ui/functions/defineFunction.md.
Lynx
  • English
  • genui / a2ui / defineFunction

    defineFunction()

    function defineFunction(impl: FunctionImpl, manifest?: FunctionManifest): CatalogFunctionEntry

    Build a function entry for defineCatalog. Either pair the impl with the extracted manifest, or pass just the impl (the registry still routes calls; the agent just won't see the parameter schema).

    Parameters

    ParameterType
    implFunctionImpl
    manifest?FunctionManifest

    Returns

    CatalogFunctionEntry

    Example

    const requiredEntry = defineFunction(required, requiredManifest);
    const catalog = defineCatalog([Text, Button, requiredEntry]);

    Defined in

    @lynx-js/genui/a2ui/src/catalog/defineCatalog.ts:65

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.