Protocol Errors vs Tool Failures
Tell transport faults from business-logic errors.
Two Very Different Failures
MCP has two kinds of failure: a protocol error in the wire itself, and a tool failure inside your business logic. They are handled differently.
Protocol Errors Live in JSON-RPC
A protocol error means the message could not be processed at all, like an unknown method or malformed params. It rides in the JSON-RPC error field.
{"jsonrpc": "2.0", "id": 7,
"error": {"code": -32601,
"message": "Method not found"}}All lessons in this course
- Tool Errors the Model Can See
- Protocol Errors vs Tool Failures
- Validate Inputs Before Acting
- Fail Safely, Never Hang