MCP tool error messages too generic: write errors a model can act on
Messages like 'Internal Server Error' or under 15 characters fail Claude review. Return isError true with what was wrong and how to fix it.
Return isError: true with text that says what was wrong and how to fix it. The rule errors.unhelpful-message is a major finding. Claude's review criteria say generic errors such as "Internal Server Error" or "Bad Request" with no detail fail review.
What you see
- A scan reports
errors.unhelpful-messageper tool:<tool>: "Internal Server Error". - It only checks errors seen in fixture calls that failed. Without fixtures, the rule has nothing to read.
Why it happens
The rule flags an error text shorter than 15 characters, or one that matches a generic phrase: error, internal server error, bad request, something went wrong, an error occurred, request failed, failed, unknown error, invalid request, server error, unauthorized, forbidden, not found, undefined, null or [object Object].
Causes: a catch-all handler that returns a status text, an upstream HTTP error passed through, or an exception serialised badly.
The MCP tools spec separates protocol errors from tool execution errors. Execution errors carry "actionable feedback that language models can use to self-correct and retry with adjusted parameters" and clients SHOULD give them to the model. The spec's example: "Invalid departure date: must be in the future."
Check it yourself
curl -s -X POST https://mcp.acme.example/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H "Authorization: Bearer $TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_order","arguments":{"order_id":"nope"}}}' \
| jq '.result | {isError, text: .content[0].text}'
Fix
State the cause and the next step:
- Bad:
Not found - Good:
No order with id "nope". Order ids look like ord_1001; use list_orders to find one.
For validation, name the field and the allowed values: carrier must be one of: acme_ground, acme_air. Keep stack traces and internal details out (errors.stack-trace-leak) and secrets out (errors.secrets-in-output).
Verify
Repeat the bad call and read the text, then re-scan with a failing fixture.
Which clients care
Claude, ChatGPT and general, per the rule.
Source
MCP tools spec, error handling: https://modelcontextprotocol.io/specification/2026-07-28/server/tools
Claude review criteria: https://claude.com/docs/connectors/building/review-criteria
Run a free scan at https://mcpshipyard.com/scan to check every rule at once.
Check every rule at once
A free scan runs this check and the other 152 against your live URL.