You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Calling a nonexistent tool should trigger a JSON-RPC Error #1510
Describe the bug
When a client attempts to call a tool that does not exist the specification requires that a protocol error is raised as a JSON-RPC Error. Instead, the current SDK returns a JSON-RPC Result with isError = true.
This appears to have already been fixed by #1389 (commit 108f2f3). The fix moved the tool-not-found and tool-disabled checks outside the try/catch block in the tools/call handler, so they now correctly propagate as JSON-RPC errors (ProtocolError with InvalidParams code) instead of being caught and wrapped as CallToolResult with isError: true.
The fix is on the main branch. This issue can likely be closed.
Activity
chemicL commentedon Feb 9, 2026
I believe this behaviour is intended looking at #1044. However, it is against the specification. Perhaps the spec has to change?
fix: return JSON-RPC error for nonexistent tool calls
fix: return JSON-RPC error when tool not found per spec
fix: throw ProtocolError as JSON-RPC error for tool not found
fix: throw ProtocolError as JSON-RPC error for tool not found
fix: throw ProtocolError as JSON-RPC error for tool not found
fahe1em1 commentedon Mar 12, 2026
Opened a focused fix in #1674 that keeps missing-tool failures as JSON-RPC errors instead of wrapping them into
CallToolResult.isError.m13v commentedon Mar 13, 2026
kdn-posipaka commentedon Mar 13, 2026
This appears to have already been fixed by #1389 (commit 108f2f3). The fix moved the tool-not-found and tool-disabled checks outside the
try/catchblock in thetools/callhandler, so they now correctly propagate as JSON-RPC errors (ProtocolErrorwithInvalidParamscode) instead of being caught and wrapped asCallToolResultwithisError: true.The fix is on the
mainbranch. This issue can likely be closed.felixweinberger commentedon Mar 26, 2026
Fixed by #1389 — tool-not-found and tool-disabled checks now throw before the try block, so they propagate as JSON-RPC errors.