Configuration for a tool.

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

Type Parameters

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.