Repository navigation
Conversation
Effect's McpServer reported invalid tool arguments as a JSON-RPC InvalidParams error. Some clients (the Claude app) show only a generic "tool call failed" for protocol errors, hiding the validation message from both the user and the model. Return an isError tool result with the message instead, so callers see what was wrong and can retry.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, well-scoped MCP error-handling fix: invalid tool parameters are returned as explicit error results while valid calls and other failure paths remain unchanged. Targeted production-registration tests cover the new response shape. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to Invalid MCP arguments now return tool-level errors, while ping timeouts retain the existing disconnect handling. The supplied evidence identifies no actionable merge-blocking regression. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review details
Pre-merge checks |
|
|
Note Written by Hi! We are cleaning up open PRs, and this one does not say which model or harness was used to create it. If this change is really important, we recommend rebuilding the PR with a newer model and noting the model and harness in the PR description. |
Problem
Effect's
McpServerreports invalid tool arguments as a JSON-RPCInvalidParams(-32602) protocol error. Some clients, including the Claude app, show only "MCP tool call failed" for protocol errors, hiding the reason from both the user and the model. Seen witht3_thread_launchwhen the client sentworkspaceStrategyas a JSON string.Change
Extends
patches/effect@4.0.2.patchsoMcpServerreturns parameter validation failures as anisError: truetool result carrying the validation message. The model sees what was wrong and can retry.pnpm-lock.yamlchanges are only the new patch hash.Note: this interacts with #17823, whose
t3_thread_readunknown-param test expects a protocol error. Whichever lands second needs that assertion switched toisError/content(a few-line test change). Happy to rebase.Scope and approval
Small, focused fix: a known failure mode is reported in a form clients can show. No tool schemas or behavior on valid input change.
Verification
Updated
McpHttpServer.test.ts(preview_click) andtoolkits/core.test.ts(t3_thread_organize) to assert theisErrorresult and message; both pass, as do the rest of the MCP tests. Reproduced the originalt3_thread_launchfailure from Claude Code before the fix.