/** * Tool registration barrel — registers all tool groups on the MCP server. */ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { logger } from "../logger.js"; export { logger }; type McpTextResult = { content: Array<{ type: "text"; text: string; }>; isError?: true; }; type ToolHandler = (args: T) => Promise; /** * Higher-order wrapper for MCP tool handlers. * * - Catches unhandled errors and converts them to `isError: true` responses. * - Logs each call with `logToolCall` (method name, duration, error if any). * * Usage: * server.tool("my_tool", schema, wrapTool("my_tool", async ({ arg }) => { ... })); */ export declare function wrapTool(method: string, fn: ToolHandler): ToolHandler; export declare function registerAllTools(server: McpServer): void; //# sourceMappingURL=index.d.ts.map