import type { CallToolResult, InputRequiredResult } from '@modelcontextprotocol/server'; /** What a tool handler may return: the ordinary tool result or a * multi-round-trip `input_required` result (2026-07-28 MRTR — the server * asks the client for input and completes on retry). */ export type ToolResult = CallToolResult | InputRequiredResult; /** Success result: the payload is emitted twice — as JSON text for every * client, and as `structuredContent` for clients that validate against the * tool's declared outputSchema (2026-07-28 JSON Schema 2020-12). */ export declare const ok: (data: unknown) => CallToolResult; export declare const err: (msg: string) => CallToolResult; /** * Scoped not-found error: records are addressable by id ONLY within the * client they were created under, so a plain "note not found" misleads when * the id actually belongs to another client (the delete would silently * appear to fail). Point the agent at the workspaceId override instead. */ export declare const notFound: (kind: string) => CallToolResult; /** * Discriminated not-found: when the id provably exists in another client * (`elsewhere` carries its workspace), keep the actionable workspaceId hint; * when it exists nowhere, say so plainly instead of inventing a wrong * diagnosis. `elsewhere` is the result of the db `*FromAny` lookups * (truthy = the id exists, but not in this client). */ export declare const notFoundOrForeign: (kind: string, elsewhere: unknown) => CallToolResult; /** Run a synchronous tool handler, converting any thrown error into a clean tool error. */ export declare const guard: (fn: () => ToolResult) => ToolResult; /** Run an async tool handler, converting any thrown error into a clean tool error. */ export declare const guardAsync: (fn: () => Promise) => Promise; export declare const guardCtx: (ctx: unknown, fn: () => ToolResult) => ToolResult; export declare const guardAsyncCtx: (ctx: unknown, fn: () => Promise) => Promise; //# sourceMappingURL=respond.d.ts.map