Repository navigation
Conversation
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.
Fixes #1916
Summary
Tools wrapped in
DelegatingMcpServerToolnow advertise an output schema matching their structured content to clients on the 2025-06-18 and 2025-11-25 protocols.Unwrap the delegation chain only to identify SDK-created tools, then apply the existing legacy schema transform to the outer tool's
ProtocolTool. Wrapper descriptions and schema constraints are preserved. Custom tools and 2026-07-28 clients retain their existing behavior. No public API is added.Verification
Validated with the original .NET project/MSBuild and xUnit/VSTest entries, using the prepared local dependencies without restore or downloads. Builds retained warnings-as-errors and included the referenced analyzers, hosting/task/app libraries, and test-server prerequisites.
tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csprojwith--no-restore --framework net10.0 --configuration Debug: passed with zero warnings/errors on both baseline and repaired sources.dotnet testagainst the selected baseline (3338e88) and repaired sources. The baseline produced 10 expected schema failures and 28 passes; the repair passed all 38 cases. The actual baseline production files were used with the added tests backported temporarily; repaired source bytes were restored before the after-fix build.git diff --check: passed; the contribution worktree is clean.Focused test filter:
FullyQualifiedName~DelegatingToolOutputSchemaTests|FullyQualifiedName~DelegatingMcpServerToolTests|FullyQualifiedName~Sep2106ListToolsBackCompatTestsTests used
--no-build --no-restore --framework net10.0 --configuration Debug, the existing blame/crash handling and 7-minute hang budget, TRX output, and XPlat coverage collection. Coverage includes nested wrappers, wrapper overrides, nullable object and absent schemas, custom tools, both legacy protocols, and modern-client controls.The complete platform/framework/configuration matrix, npm-backed integrations, packaging/API validation, AOT, documentation, and combined coverage workflows remain for CI. They were not run in this offline validation. A separate independent review is still required before publication.
AI assistance was used in preparing this contribution.