PRODUCTION SCENARIO
An MCP database tool hits a deadlock part-way through a write and the transaction is rolled back. The tools/call request was well-formed and named an existing tool; the database operation is what failed. The service runs unattended, with no operator at a console to consult, and the agent is able to retry the write itself once it knows what happened.
How should the server represent that failure?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: A tool result with isError true, naming the deadlock and a retry
MCP separates the two mechanisms: protocol errors describe a request the server could not process, while a failure inside a running tool comes back in the result with isError true and content the model can act on, and clients are told to pass those to the model so it can self-correct. A deadlock on a valid call is the second kind. A JSON-RPC error is the envelope for an unknown tool or a malformed request, which models rarely recover from. Asking for input is the mechanism when a person has to choose, and nobody is at the console. A zero-row result describes a query that ran and matched nothing, which is what the agent would then believe about a write that never landed.