“Tool failed” is not an error message. It is a debugging tax. When an AI agent queries a database through MCP, failures need to be structured enough for the agent to recover and specific enough for humans to audit. A database tool can fail because: Those should not all collapse into the same generic error. A useful MCP database error explains: Longer version: MCP tool errors for AI database agents The happy path demos well. The unhappy path is what makes the system operable.
The MCP attack your code review cannot see