-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Since the introduction of #194 the error behaviour of the MCP server has changed. Now missing tools and violations of the input schema do not cause a protocol error (JSON RPC error) anymore, but a tool execution error (i.e. successful JSON RPC response, with MCP isError flag set to true).
At least the former seems to be in violation of the MCP spec: https://modelcontextprotocol.io/specification/2025-06-18/server/tools#error-handling
Tools use two error reporting mechanisms:
- Protocol Errors: Standard JSON-RPC errors for issues like:
- Unknown tools
- Invalid arguments
- Server errors
(highlighting mine)
To Reproduce
Steps to reproduce the behavior:
- Create an MCP server that has an empty array of tools (
MCP::Server.new(tools: [])) - Try to call a tool
Expected behavior
A JSON RPC error response (e.g. root-level element error)
References
- PR introducing change: Show exception messages for tool call errors #194
- Relevant piece of MCP spec: https://modelcontextprotocol.io/specification/2025-06-18/server/tools#error-handling
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working