
This fix is part of MCP troubleshooting, within The MCP Guide. Still stuck? Request a free MCP readiness review.
"Tool call failed" means the MCP server is connected, but one specific call did not succeed. Either the request itself was rejected (a protocol error, such as an unknown tool or bad arguments) or the tool ran and reported a problem (a tool execution error, such as an API failure or invalid date). The fastest fix is to copy the tool name and arguments, run the same call in the MCP Inspector, and read the exact error it returns.
Checked against: the MCP 2026-07-28 tools specification, Claude's connector troubleshooting page, the MCP Inspector docs, Cursor's MCP docs and the Claude Code MCP docs on 2 November 2026. eSEOspace did not reproduce failures in each client.
Key Takeaways
- The spec defines two kinds of tool errors: protocol errors (JSON-RPC errors) and tool execution errors (results with
isError: true). - An unknown tool returns a JSON-RPC error such as code
-32602with "Unknown tool: invalid_tool_name." - Tool execution errors carry "actionable feedback" so the model can "self-correct and retry with adjusted parameters."
- Claude shows "Unexpected error while invoking tool" when the call reached the server and the server returned an error result.
- Claude Code warns when tool output passes 10,000 tokens and limits output to 25,000 tokens by default.
What this error means
The 2026-07-28 tools specification splits failures in two.
Protocol errors cover "unknown tool," "malformed requests" and "server errors." They come back as standard JSON-RPC errors, for example:
{
"jsonrpc": "2.0",
"id": 3,
"error": {
"code": -32602,
"message": "Unknown tool: invalid_tool_name"
}
}
Tool execution errors cover "API failures," "input validation errors" and "business logic errors." They come back as a normal result with isError: true and a text message. The spec says clients "SHOULD provide tool execution errors to language models to enable self-correction."
So a failed call is not a broken connection. Claude's troubleshooting page says the same: "A failed tool call isn't a connection failure."
Quick fix
- Read the error text. It often says exactly what is wrong, such as a missing field or an expired record.
- Replay the call in the Inspector. The Inspector docs show a CLI form:
npx @modelcontextprotocol/inspector --cli https://api.example.com/mcp --transport http \
--method tools/call --tool-name get_weather --tool-arg city=Boston --format json
For a local server, put its command after --cli instead of the URL.
- Compare the arguments with the tool's input schema from
tools/list. Wrong types, wrong date formats and missing required fields are common. - Check permissions. If the tool calls an outside API, your account may lack access to that record or action.
- Check the server logs at the time of the failure. Claude's troubleshooting page also asks whether the failure "affects every user of your connector or one account."
- Retry with corrected input, or tell the model what was wrong in your next message.
Fix by client / OS
Claude (claude.ai and Desktop connectors)
"Unexpected error while invoking tool," followed by the tool name, means "Claude's tool call reached your server, and your server returned an error result for it," per Claude's troubleshooting page. There is no ofid_ reference ID for tool failures. To report one, include the tool name, the time of the failure in UTC, and the connector URL.
Claude Code
The Claude Code MCP docs say Claude Code shows a warning when tool output exceeds 10,000 tokens and limits it to 25,000 tokens by default. Raise the limit with MAX_MCP_OUTPUT_TOKENS=50000. Long-running tools can hit the tool timeout; set MCP_TOOL_TIMEOUT or a per-server timeout.
Cursor
Cursor's MCP docs say failed tool calls are marked as failed in chat, and you can retry or check the logs. Cursor asks for approval by default, and you can expand a call to see its arguments, which helps spot bad input.
VS Code
Use MCP: List Servers > Show Output to read the server's side. The VS Code MCP page notes that a running server does not guarantee its tools are available to the current session.
Where to find the logs
| Where | What to look for |
|---|---|
| Server logs | The handler's exception and the arguments it received |
| Claude Desktop | mcp-server-SERVERNAME.log for local servers |
| Cursor | MCP Logs in the Output panel |
| Claude Code | /mcp and the tool result in the transcript |
| Inspector | The raw JSON-RPC request and response |
Map any JSON-RPC code you see with the MCP error code lookup.
If it still fails
- Error code -32602 on every call. See invalid params -32602.
- The tool does not exist. The model may be using an old name. Refresh the tool list or see method not found -32601.
- The call hangs then fails. See request timed out.
- The server drops during the call. See Connection closed.
- You build the server. Return helpful
isErrormessages. The MCP tool errors reference and error handling lesson show how.
If a vendor tool keeps failing in ways that hurt your team's work, an MCP readiness audit can decide whether to replace it or wrap it.
More in the MCP Guide
Free tools: MCP Error Code Lookup · MCP Config Generator
Latest research: State of MCP: October 2026
Frequently asked questions
Why does Claude retry a failed tool on its own?
Tool execution errors are sent back to the model so it can adjust and try again. That is by design in the spec. If the retries keep failing, the input or permissions need fixing.
Is "tool call failed" a server bug?
Sometimes. It can also be bad input from the model, missing permissions, or an outside API being down. Replay the call in the Inspector to tell which.
How do I stop the model from calling a risky tool?
Set that tool to need approval or block it in your client. Use the MCP tool permission planner to decide which tools stay read-only.
Can large results cause a tool call to fail?
Yes. Clients set output limits. Claude Code caps output at 25,000 tokens by default, and saves text results longer than 50,000 characters to a file unless the server raises that tool's limit.











