import { z } from 'zod'; import { type ApiOpts } from './api.js'; export interface ToolAnnotationShape { title: string; readOnlyHint: true; destructiveHint: false; idempotentHint: true; openWorldHint: false; } export interface ToolDef { name: string; description: string; schema: z.AnyZodObject; annotations: ToolAnnotationShape; /** Calls the REST API. opts.envelope=true adds ?envelope=1 (the * structuredContent channel); the flat default feeds the legacy text * channel, which stays byte-identical release to release. */ handler: (args: Record, opts?: ApiOpts) => Promise; /** This tool's payload shape inside the envelope's `result` (every field * nullish + passthrough — see envelope.ts). */ resultSchema: z.ZodTypeAny; /** Pre-2.11 rich text layout (summary lead + own citation line) — preserved * byte-identically for the tools that already shipped it. */ richText?: boolean; /** Optional one-line human citation appended to the text content. */ citation?: (result: unknown) => string; /** Local tools with no REST endpoint build their (static) envelope here, * replicating the hosted /api/mcp envelope for the same tool verbatim. */ localEnvelope?: (flat: unknown) => Record; } export declare const ALL_TOOLS: ToolDef[];