Repository navigation
docs(schema): define receiver behavior for unknown v2 variants - #2500
Merged
Merged
Conversation
Open unions stay open. If a request can't be fulfilled without understanding an unknown variant, the receiver rejects it with -32602; otherwise it degrades gracefully as the field documents. Applied to the request-path unions that had no single rule: - unsupported MCP server transport: reject - unsupported session/set_config_option value type: reject - unsupported content block in session/prompt: reject - unknown elicitation action in a response: handle as cancel
benbrandt
enabled auto-merge (squash)
October 26, 2026 22:05
Merged
benbrandt
added a commit
that referenced
this pull request
Oct 27, 2026
…rvers (#2512) The unsupported-transport rule from #2500 now names a transport the Agent did not advertise and v1's `sse`. If a server fails to launch or connect, the Agent either fails the request or continues without it and should tell the user. The migration checklists say to reject SSE and unadvertised transports, and to send only advertised transports.
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.
v2 opens most discriminators so new and custom variants don't break older peers, but for unions on request paths it never said what the receiver does with a variant it can't act on. Implementations could silently ignore, reject or abort.
This keeps the unions open and adds one rule to
extensibility.mdx: if a request can't be fulfilled without understanding an unknown variant, the receiver MUST reject it with-32602. Otherwise it degrades gracefully as the field documents, for example by ignoring the variant or displaying it generically.Applied to each union that lacked a rule (doc pages and Rust doc comments, so the generated schema too):
-32602; previously "ignore it or reject the server configuration"session/set_config_optionvaluetype-32602session/prompt-32602; insession/updateit still degrades to ignore or generic displayElicitationActionin a responsecancelThe Enum Variant Extension RFD now says request-core unions can stay closed or be opened, and describes this behavior when they're open.
Main and draft v2 pages are updated together. No wire-format changes; only schema descriptions change.