import { type ToolArguments, type ToolSchema } from "./schema.js"; export interface ToolTextContent { readonly type: "text"; readonly text: string; } export interface ToolResult { content: ToolTextContent[]; readonly isError?: boolean; } export type ToolCallback = (args: TArgs) => Promise; export type ToolInvocation = (args: unknown) => Promise; export interface ToolServer { tool: (name: string, description: string, schema: ToolSchema, callback: ToolInvocation) => void; } export declare function registerTool(server: ToolServer, name: string, description: string, schema: S, callback: ToolCallback>, TResult>): void;