import * as s from "jsonv-ts"; import type { MaybePromise } from "./utils"; declare const annotationSchema: s.ObjectSchema<{ readonly title: s.Schema; readonly readOnlyHint: s.Schema; readonly destructiveHint: s.Schema; readonly idempotentHint: s.Schema; readonly openWorldHint: s.Schema; }, s.Merge>; export type ToolAnnotation = s.Static; export type ToolConfig = { title?: string; description?: string; inputSchema?: s.ObjectSchema; outputSchema?: s.ObjectSchema; annotations?: ToolAnnotation; _meta?: { [key: string]: unknown; }; }; export type ToolHandler = (params: Config extends ToolConfig ? Config["inputSchema"] extends s.Schema ? s.Static : never : never, ctx: ToolHandlerCtx) => MaybePromise; export type ToolHandlerCtx = { text: (text: string) => ToolResponseText; json: (json: object) => ToolResponseText; context: Context; raw?: unknown; }; export type ToolResponseText = { type: "text"; text: string; }; export type ToolResponse = ToolResponseText; export type ToolJson = ReturnType; export declare class Tool : object> { readonly name: Name; readonly config: Config; readonly handler: (params: Params, ctx: ToolHandlerCtx) => MaybePromise; constructor(name: Name, config: Config, handler: (params: Params, ctx: ToolHandlerCtx) => MaybePromise); call(params: Params, context: object, raw?: unknown): Promise; toJSON(): { name: Name; title: string | undefined; description: string | undefined; inputSchema: s.JSONSchemaDefinition; outputSchema: s.JSONSchemaDefinition | undefined; annotations: { title?: string | undefined; readOnlyHint?: boolean | undefined; destructiveHint?: boolean | undefined; idempotentHint?: boolean | undefined; openWorldHint?: boolean | undefined; } | undefined; _meta: { [key: string]: unknown; } | undefined; }; } export {};