Cereal docs
TypeScript SDKTypeScript signatures

ToolDefinition

Public TypeScript declaration from @trycereal/sdk.

Import from @trycereal/sdk. Generated from the repository SDK declarations (package version 0.0.0); not from HTTP request schemas.

export interface ToolDefinition<S extends StandardSchemaLike = StandardSchemaLike> {
    readonly name: string;
    readonly description?: string;
    readonly title?: string;
    readonly input?: S;
    readonly inputJsonSchema?: ToolJsonSchema | (() => ToolJsonSchema);
    readonly annotations?: ToolAnnotations;
    readonly deferLoading?: boolean;
    readonly handler: (input: InferInput<S>, context: ToolContext) => unknown | Promise<unknown>;
}

See SDK setup, authoring, client behavior, and the API/SDK map for usage. Domain types are described in schema reference.

Related SDK types: ToolContext, ToolAnnotations, StandardSchemaLike, ToolJsonSchema, InferInput.