UNPKG

@todo-for-ai/mcp

Version:

Model Context Protocol server for Todo for AI task management system with Streamable HTTP transport. Provides AI assistants with access to task management, project information, and feedback submission capabilities through modern HTTP-based communication.

35 lines 1.25 kB
export declare class McpError extends Error { readonly code: string; readonly statusCode: number | undefined; readonly details: any; constructor(message: string, code?: string, statusCode?: number, details?: any); } export declare class ValidationError extends McpError { constructor(message: string, details?: any); } export declare class ApiConnectionError extends McpError { constructor(message: string, details?: any); } export declare class AuthenticationError extends McpError { constructor(message: string, details?: any); } export declare class NotFoundError extends McpError { constructor(message: string, details?: any); } /** * Global error handler for unhandled errors */ export declare function setupGlobalErrorHandlers(): void; /** * Validate required arguments for MCP tools */ export declare function validateArgs(args: any, requiredFields: string[]): void; /** * Sanitize error for client response */ export declare function sanitizeError(error: Error): any; /** * Wrap async functions with error handling */ export declare function withErrorHandling<T extends any[], R>(fn: (...args: T) => Promise<R>, context: string): (...args: T) => Promise<R>; //# sourceMappingURL=error-handler.d.ts.map