Repository navigation
Conversation
…rors T3 offered only MCP 2025-06-18, so every client was held to it even when it asked for 2025-11-25, as the Claude app and Claude Code both do. Under 2025-06-18 a tool call with invalid arguments fails as a JSON-RPC InvalidParams error, which the Claude app shows only as a generic "tool call failed", hiding the validation message from the user and the model. Effect already reports these as isError tool results for 2025-11-25, so offer that version and keep 2025-06-18 for older clients.
Contributor
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The PR changes production MCP negotiation so clients requesting 2025-11-25 receive different invalid-argument semantics, while preserving the legacy 2025-06-18 path. The behavior is narrowly tested, but this product-facing default negotiation change warrants human review. Notes:
You can add or adjust custom eligibility rules. Learn more. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
T3's MCP server offers only protocol
2025-06-18, so every client is held to it, even when it asks for2025-11-25. The Claude app (Anthropic/ClaudeAI) and Claude Code both ask for2025-11-25. Under2025-06-18, a tool call with invalid arguments fails as a JSON-RPCInvalidParamserror. The Claude app shows that only as a generic "MCP tool call failed", so neither the user nor the model sees what was wrong. With strict params ont3_thread_read(#17823), any unknown param now ends that way.Change
Offer
2025-11-25alongside2025-06-18inlayerMcpTransport. Effect's2025-11-25adapter already returns invalid arguments as anisErrortool result carrying the validation message, as that spec revision requires. Clients that ask for2025-06-18still get it and keep its error behavior.This replaces #18098, which patched Effect to return tool results under
2025-06-18as well.Scope and approval
There is no triaged issue for this. I hit it while using T3 from the Claude app: whenever the model passed a bad argument to a T3 tool, the app reported only "MCP tool call failed". The cause turned out to be the pinned protocol list. I think this qualifies as a small, focused fix without a prior issue because it is a one-line config change. It enables a protocol version that the Effect version T3 already ships implements and that current clients already request. Tool definitions and handlers don't change, and
2025-06-18stays available for older clients.Note: the single-version list looks like a leftover rather than a deliberate limit. It was added in #5331, when Effect beta.103 made
protocolsrequired and, as far as I can tell,v2025_06_18was its only adapter. Later Effect versions added newer adapters, but the list was never revisited. I didn't find any discussion of it, so I may be missing a reason.#16067 traces another failure to the same pinned list: clients that open with
2026-07-28server/discoverget a 400. This PR doesn't add2026-07-28, so it doesn't fix that issue.Verification
McpHttpServer.test.tsinitializes with each version, then calls a tool with a wrong argument type. For2025-11-25, the session negotiates2025-11-25and the call returnsisError: truewith "Invalid parameters for tool 'count': Expected number…". For2025-06-18, the call still returns the-32602error. Against the old protocol list, the test fails because the client is negotiated down to2025-06-18.apps/server/src/mcppass, and the server typecheck is clean.initializeon a running server and confirmed that the Claude app (Anthropic/ClaudeAI 1.0.0) and Claude Code (2.1.295) request2025-11-25. With this change running, both negotiated2025-11-25(the server spans were@effect/mcp/2025-11-25/tools/call). At3_thread_readcall withlimit: 500showed both clients "Invalid parameters for tool 't3_thread_read': Expected a value less than or equal to 100 at ["limit"]". Before the change, the Claude app showed only "MCP tool call failed" for such calls.Done with Claude Opus 5.5 (
claude-opus-5-5) in Claude Code, run through T3 Code.