Gate application result fields by protocol version - #1816
Open
KirschBluteX wants to merge 4 commits into
Open
Conversation
sitihawa140492-byte
approved these changes
Aug 13, 2026
KirschBluteX
force-pushed
the
fix/protocol-result-gating-1754
branch
from
August 14, 2026 19:04
08e678b to
ad347ea
Compare
Author
|
@jeffhandley @halter73 Could you review the updated head? Since Could you confirm this is the intended boundary for #1754 and approve if it looks right? |
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.
Fixes #1754.
Summary
Normalize protocol-version-specific properties on typed results at a single terminal response-emission boundary, after outgoing message filters have run.
resultTypeand, for cacheable results,ttlMsandcacheScope. The server emits at most one compatibility warning per method, including under concurrent or repeated emissions.2026-07-28or later preserve explicit values and restore required defaults (resultType: "complete",ttlMs: 0, andcacheScope: "private") if a filter removes them.nextcalls without mutating shared result instances.McpServerOptions.RequestHandlersremain outside this boundary because they operate on already-serialized JSON and intentionally bypass the typed handler infrastructure.The selected policy is strip plus warning. This keeps legacy wire responses schema-valid while making application misuse visible, following the SDK's existing compatibility-warning convention without turning otherwise valid requests into errors.
Tests
ModelContextProtocol.slnxRelease build: 0 warnings, 0 errors.Execution!=Manual,net10.0): 617 passed, 30 skipped, 0 failed.git diff --checkand targeteddotnet format --verify-no-changespassed.Unknown tool: trigger-sampling-requestbefore exercising this change.