When an MCP Tool Errors: Structured Tool Errors vs a Raw Exception
Quick answer: An MCP tool should return a structured, machine-readable error when something goes wrong, not let a raw exception bubble up. The agent calling the tool has to decide whether to retry, fix its parameters, or ask the user, and it can only do that with a stable error code and message. A…
Read the full story at DEV Community — AI ↗
Timeline · 1 report
- 2026-11-02 07:13 · DEV Community — AI
When an MCP Tool Errors: Structured Tool Errors vs a Raw Exception