CreateToolOptions
CreateToolOptions
Configuration options for creating an AI tool.
Signature
interface CreateToolOptions<T extends ToolParameterType, R = unknown, C extends JSONSchema7 = JSONSchema7> {
name: string;
description: string;
inputSchema: T;
contextSchema?: C;
execute: ToolExecuteFunction<T, R>;
}
name
property
stringThe unique name identifier for the tool
description
property
stringA human-readable description of what the tool does
inputSchema
property
TThe parameter schema that defines the tool's input structure
contextSchema
property
CThe context schema for this tool
execute
property
ToolExecuteFunction<T, R>The function that executes when the tool is called