import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; export interface ToolSuccessOptions { readonly title: string; readonly summary?: string; readonly data?: Record; readonly links?: ToolLink[]; readonly uiResourceUri?: string; /** * Pre-rendered, human-readable markdown body shown in the tool's text content. * * Clients such as Codex, Cursor, and Claude Code render this text but rarely * surface raw structuredContent, so tools pass a presenter-built summary here * to give a dashboard-like result inline. */ readonly bodyMarkdown?: string; } export interface ToolLink { readonly name: string; readonly url: string; readonly description?: string; } /** * Build a result that is useful in every MCP client. * * The text content is intentionally human-readable for terminal-style clients. * structuredContent carries the machine-readable payload for clients that can * render cards, tables, or MCP Apps widgets. */ export declare function toolSuccess(options: ToolSuccessOptions): CallToolResult; export declare function toolError(error: unknown): CallToolResult; export declare function safeTool(handler: () => Promise): Promise;