@squidcloud/backend
    Preparing search index...

    Type Alias AiFunctionMetadataOptions

    AiFunctionMetadataOptions: AiFunctionMetadataBaseOptions & (
        | { description: string; promptId?: never }
        | { description?: string; promptId: string }
    )

    Options for the @aiFunction annotation.

    You must provide a description — it tells the AI agent when to call the function. The alternative promptId form is an advanced option used only by Squid's built-in connectors to source the description from the central prompt registry; customer functions always use description.

    Type Declaration

    • { description: string; promptId?: never }
      • description: string

        Describes the capabilities of the function. This is used by the AI agent to determine when to call it.

      • OptionalpromptId?: never

        Not used with description; supply one or the other.

    • { description?: string; promptId: string }
      • Optionaldescription?: string

        Optional inline description; when omitted, the description comes from promptId.

      • promptId: string

        Id of a registered prompt that supplies this function's description, as an alternative to an inline description. Squid's built-in connectors use this to keep tool descriptions in the central prompt registry. The id is stored verbatim and resolved server-side — it is never resolved here in the SDK.