import type { z } from "zod"; /** * Configuration interface for creating a Tool * @typeParam TParameters - The Zod schema type for the tool's parameters */ export type ToolConfig = { /** The name of the tool */ name: string; /** A description of what the tool does */ description: string; /** The Zod schema defining the tool's parameters */ parameters: TParameters; }; /** * Abstract base class for creating tools with typed parameters and results * @typeParam TParameters - The Zod schema type for the tool's parameters * @typeParam TResult - The return type of the tool's execute method */ export declare abstract class ToolBase { /** The name of the tool */ readonly name: string; /** A description of what the tool does */ readonly description: string; /** The Zod schema defining the parameters, that will be passed to the tool's execute method */ readonly parameters: TParameters; /** * Creates a new Tool instance * @param config - The configuration object for the tool */ constructor(config: ToolConfig); /** * Executes the tool with the provided parameters * @param parameters - The parameters for the tool execution, validated against the tool's schema * @returns The result of the tool execution */ abstract execute(parameters: z.infer): TResult | Promise; } /** * Creates a new Tool instance with the provided configuration and execution function * @typeParam TParameters - The Zod schema type for the tool's parameters * @typeParam TResult - The return type of the tool's execute method * @param config - The configuration object for the tool * @param execute - The function to be called when the tool is executed * @returns A new Tool instance */ export declare function createTool(config: ToolConfig, execute: (parameters: z.infer) => TResult | Promise): { execute(parameters: z.infer): TResult | Promise; /** The name of the tool */ readonly name: string; /** A description of what the tool does */ readonly description: string; /** The Zod schema defining the parameters, that will be passed to the tool's execute method */ readonly parameters: TParameters; };