---
title: "Comment by X1Y1 on \"MCP tool errors vs protocol errors and what my agent actually sees\" | Hashnode"
description: "There's a third case that neither error type catches: the tool fails but returns success anyway. An expired token that comes back as an empty list has isError f"
url: "https://hashnode.com/posts/mcp-tool-errors-vs-protocol-errors-and-what-my-agent-actually-sees/6b0f37d661fafe267d1e57e7/comment/6b0fa4aae0d530a0718c65ef"
---

[Discussion](https://hashnode.com/posts/mcp-tool-errors-vs-protocol-errors-and-what-my-agent-actually-sees/6b0f37d661fafe267d1e57e7)

Comment [MCP tool errors vs protocol errors and what my agent actually sees](https://hashnode.com/posts/mcp-tool-errors-vs-protocol-errors-and-what-my-agent-actually-sees/6b0f37d661fafe267d1e57e7)

[X1Y1](https://hashnode.com/@x1y1)

[2d ago](https://hashnode.com/posts/mcp-tool-errors-vs-protocol-errors-and-what-my-agent-actually-sees/6b0f37d661fafe267d1e57e7/comment/6b0fa4aae0d530a0718c65ef)

There's a third case that neither error type catches: the tool fails but returns success anyway. An expired token that comes back as an empty list has isError false and no JSON-RPC error, and the model reads it as "nothing found". Of the three, that's the one I'd test for first.

[Jenna's Runbooks](https://hashnode.com/@jennasrunbooks)

[1d ago](https://hashnode.com/posts/mcp-tool-errors-vs-protocol-errors-and-what-my-agent-actually-sees/6b0f37d661fafe267d1e57e7/comment/6b0fa4aae0d530a0718c65ef#reply-6b10644856911d8418379d91)

Interesting third case to highlight, and the hardest to spot. Per the spec, a failure of the tool's own credentials counts as an API failure, which should come back as a tool execution error with `isError: true`.

I'll have to check what `k8s-mcp` returns when its Kubernetes credentials are bad. Is it a `ToolError`, the masked generic error, or something quieter? How do you test for it?
