/** * MCP tool response helpers. * * Provides consistent response formatting across all tools, * including proper isError flag usage and output truncation. */ import { z } from "zod"; type McpTextContent = { type: "text"; text: string; }; type McpToolResponse = { content: McpTextContent[]; isError?: boolean; }; /** Zod schema for the output_format parameter shared by all tools. */ export declare const outputFormatSchema: z.ZodDefault>>; /** * Format a tool response in either text or JSON mode. * * @param data - The structured data object (used for JSON output) * @param textFormatter - A function that produces the human-readable text * @param outputFormat - "text" or "json" */ export declare function formatResponse(data: unknown, textFormatter: () => string, outputFormat: string): McpToolResponse; /** Build a successful MCP response, truncating if necessary. */ export declare function successResponse(text: string): McpToolResponse; /** Build an error MCP response with isError: true. */ export declare function errorResponse(error: unknown): McpToolResponse; export {};