A human developer who hits a 400 response can open the docs, reproduce the call, and read a stack trace. An agent inside an execution loop has none of those moves. It gets the response body, interprets it, and must pick its next action without leaving the loop. A body that says only "Invalid input" leaves the agent with exactly one fact (something failed) and no path forward, which in practice means it either halts or retries the same broken payload indefinitely per this analysis of agent error handling.
The industry measure of this gap is blunt. Postman's State of the API Report found that 89% of developers use AI in daily work but only 24% design APIs with AI agents in mind, which is why vague error bodies remain the norm according to Zuplo's write-up of the readiness gap. The fix is not better prose. It is a schema the agent can branch on.
There is a second reason to treat errors as structured data: the runtime channel is a trust boundary. Tool responses flow into the model's context and are treated as trusted input, and the MCP specification explicitly says tool annotations and descriptions should be treated as untrusted unless they come from a trusted server per the MCP specification. An error object built from a fixed schema and validated on arrival is one of the few things the agent can safely act on without a human reading it.
Worth noting: MCP already provides a transport-level error channel in the JSON-RPC 2.0 error response object, and the protocol reserves error codes for protocol failures as described in the schema reference. Your application-level error payload sits inside result.isError or your own response envelope, not in the transport error. Keep those two layers separate or you will confuse protocol bugs with business failures.



