Description: Tool handlers currently throw raw exceptions or return unsanitized error strings that may include stack traces or internal connection details.
Impact: Leaking of internal implementation details and poor developer experience for LLM integrations.
Recommended Fix: Create a mapping utility (toMcpErrorResult) that scrubs sensitive data and returns consistent, user-safe error messages to the client.
Affected Files: src/mcp/tools.ts, src/errors/ErrorHandler.ts.
Description: Tool handlers currently throw raw exceptions or return unsanitized error strings that may include stack traces or internal connection details.
Impact: Leaking of internal implementation details and poor developer experience for LLM integrations.
Recommended Fix: Create a mapping utility (toMcpErrorResult) that scrubs sensitive data and returns consistent, user-safe error messages to the client.
Affected Files: src/mcp/tools.ts, src/errors/ErrorHandler.ts.