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
MCP: Return a tool error when a command fails during execution #2680
The server log records a FilterException for the call, so the server knows this is a request error with a code and a message. An agent sees "Internal error" and has nothing to correct. Other request errors in the same run, such as an unknown collection, came back as tool errors with the full Data API error body.
#2653 converts failures raised before the command runs. handleSetupFailure in McpResource covers validation and context setup. A failure from meteredCommandProcessor.processCommand inside executeCommand has no matching conversion, so it leaves the tool method as an exception and the framework reports an internal error.
This ticket is done when a request error raised during execution returns isError: true with the Data API error in structuredContent.errors, and a test covers the unsupported filter operator. Authentication failures, protocol errors, and cancellation should keep their current handling, the same as on the setup path.
Observed on 3467041f7 against DSE 6.9.21. I have not compared the response from the same command over HTTP.
The cause is different from what I wrote above. CommandProcessor does turn the filter error into an error result. MeteredCommandProcessor then builds the filter clause again to choose the sort_type metric tag, and the second failure replaces the result. So the fix belongs in the shared metrics code and is based on main, not on the MCP stack. The HTTP API has the same failure but its exception mapper hides it, apart from the missing timer.
Activity
erichare commentedon Nov 19, 2026
The cause is different from what I wrote above.
CommandProcessordoes turn the filter error into an error result.MeteredCommandProcessorthen builds the filter clause again to choose thesort_typemetric tag, and the second failure replaces the result. So the fix belongs in the shared metrics code and is based on main, not on the MCP stack. The HTTP API has the same failure but its exception mapper hides it, apart from the missing timer.