fix: validate and forward SEP-2243 parameter headers - #109
Open
lucarlig wants to merge 17 commits into
Open
Conversation
lucarlig
force-pushed
the
user/luca/sep2243-rmcp-headers
branch
from
August 21, 2026 16:42
4005c69 to
e3abd7e
Compare
This was referenced Aug 21, 2026
lucarlig
force-pushed
the
user/luca/sep2243-rmcp-headers
branch
from
August 24, 2026 08:53
374730d to
7a65618
Compare
lucarlig
force-pushed
the
user/luca/sep2243-rmcp-headers
branch
from
August 24, 2026 13:59
7a65618 to
752a212
Compare
lucarlig
force-pushed
the
user/luca/sep2243-rmcp-headers
branch
from
August 24, 2026 14:29
752a212 to
0a81ed1
Compare
lucarlig
marked this pull request as ready for review
August 25, 2026 12:33
lucarlig
force-pushed
the
user/luca/sep2243-rmcp-headers
branch
from
August 26, 2026 08:33
a203fcb to
d23977d
Compare
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
lucarlig
force-pushed
the
user/luca/sep2243-rmcp-headers
branch
from
August 26, 2026 09:07
d23977d to
618c702
Compare
dawid-nowak
requested changes
Aug 26, 2026
dawid-nowak
left a comment
Contributor
There was a problem hiding this comment.
-
I don't see how checking the max body size of the message is a part of header validation logic. Ideally, body size validation should be in a separate layer and re-using layers provided by Axum.
-
This header validation logic only applies to tools. Not sure if using a layer approach is valid as this is going to be executed on all rmcp calls as well as new and old protocols.
Signed-off-by: lucarlig <luca.carlig@ibm.com>
lucarlig
force-pushed
the
user/luca/sep2243-rmcp-headers
branch
from
August 26, 2026 10:41
403863c to
0c47a08
Compare
dawid-nowak
requested changes
Aug 26, 2026
dawid-nowak
left a comment
Contributor
There was a problem hiding this comment.
I think you should move validation to tools/call handler.
- If something is not right with the request rmcp will validate it anyway.
- You can easily get access to all necessary headers via:
let downstream_headers = cx.extensions.get::().map(|parts| &parts.headers); - Everything related to tool call is in one place.
- Not sure if this header is auto propagated to upstream so you might need to do it manually.
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Contributor
Author
|
Addressed in ef71cba:
|
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
tools/callMcp-Param-*headers against request-scoped tool schemas published by the control plane-32020for a mismatch or missing published schematools/calland protect them from backend header configurationThe dataplane does not call
tools/list, reconstruct headers from arguments, or change RMCP. This PR requires IBM/mcp-context-forge#6348 to publish visibility-filtered schemas keyed by original upstream tool name.The GitHub composed conformance job still pulls the stock control-plane image and therefore fails to deserialize its pre-#6348 payload (
missing field tool_schemas). No dataplane fallback is included; the job will pass once #6348 is merged into that image.Stacked on #107. Related: IBM/mcp-context-forge#6256.
Verification
cargo clippy --locked --workspace --all-targets -- -D warningscargo nextest run --locked --workspace(227 passed, 3 skipped)-32020The direct fixture E2E is used because the official server scenario currently reaches the separately baselined stateless
tools/listsession limitation during setup. Client findings remain limited to the existing four shell-adapter generation IDs.