fix: enforce MCP parameter header requirements - #126
Open
lucarlig wants to merge 2 commits into
Open
Conversation
lucarlig
marked this pull request as ready for review
September 1, 2026 12:01
lucarlig
force-pushed
the
user/luca/allow-missing-tool-schemas
branch
from
September 1, 2026 12:40
dcb5b03 to
20fc11c
Compare
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
lucarlig
force-pushed
the
user/luca/allow-missing-tool-schemas
branch
from
September 2, 2026 13:26
20fc11c to
9e0c3a6
Compare
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.
Summary
tool_schemasto be omitted and validate parameter headers only when the control plane publishes the called tool's input schemax-mcp-headercontract: token syntax, case-insensitive uniqueness, primitive types, properties-only nested paths, exact value extraction, null/absence behavior, safe integers, numeric comparison, Base64 decoding, unsafe plain values, and repeated headersMcp-Param-*headers unchanged when no matching annotation is publishedBehavior
nullnullHeaderMismatch(-32020)HeaderMismatch(-32020)Malformed annotations invalidate validation for the tool call. Malformed, conflicting, or mismatched recognized header values fail closed before the backend is called.
RMCP dependency
The dataplane returns the required
HeaderMismatchJSON-RPC error. The required HTTP 400 mapping is tracked by upstream RMCP PR modelcontextprotocol/rust-sdk#1226; this PR intentionally does not duplicate or vendor that transport fix.Validation
mainat29a2a81cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo nextest run --locked --workspace(229 passed, 11 skipped)cargo build --locked --workspacecargo deny check advisories licenses(passed; existing transitive yankedchacha20 0.10.1warning throughrmcp)cargo shear --check-test-targets --deny-warnings --lockedmdbook build _context/wikimdbook test _context/wiki