/** * Shared utilities for tool implementations. */ export type ToolResult = { [key: string]: unknown; content: Array<{ type: "text"; text: string; }>; isError?: boolean; }; /** * Creates a successful tool response with JSON content. */ export declare function jsonResult(data: unknown): ToolResult; /** * Creates an error tool response. */ export declare function errorResult(error: unknown): ToolResult; /** * Wraps an async tool handler with standard error handling. */ export declare function withErrorHandling(handler: (args: TArgs) => Promise): (args: TArgs) => Promise; /** * Attaches non-empty warnings to a result object. Tools surface partial * response and migration warnings this way rather than dropping them. */ export declare function withWarnings(result: T, warnings: string[]): T | (T & { warnings: string[]; }); //# sourceMappingURL=helpers.d.ts.map