Genkit JS API reference
    Preparing search index...

    Interface ToolConfig<I, O>

    Configuration for a tool.

    interface ToolConfig<I extends z.ZodTypeAny, O extends z.ZodTypeAny> {
        description: string;
        inputJsonSchema?: JSONSchema7;
        inputSchema?: I;
        metadata?: Record<string, any>;
        name: string;
        outputJsonSchema?: JSONSchema7;
        outputSchema?: O;
    }

    Type Parameters

    Index

    Properties

    description: string

    Description of the tool. This is passed to the model to help understand what the tool is used for.

    inputJsonSchema?: JSONSchema7

    Input JSON schema. Mutually exclusive with inputSchema.

    inputSchema?: I

    Input Zod schema. Mutually exclusive with inputJsonSchema.

    metadata?: Record<string, any>

    Metadata to be passed to the tool.

    name: string

    Unique name of the tool to use as a key in the registry.

    outputJsonSchema?: JSONSchema7

    Output JSON schema. Mutually exclusive with outputSchema.

    outputSchema?: O

    Output Zod schema. Mutually exclusive with outputJsonSchema.