Implement SEP-1319: Decouple Request Payload from RPC Methods #617
+901
−261
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 #523
Implments SEP-1319 to comply with the 2025-11-25 MCP spec.
Motivation and Context
To decouple request payloads from RPC method. For more details, see modelcontextprotocol/modelcontextprotocol#1319.
*RequestParamto*RequestParams(plural) to match the updated reference schema_meta(containingprogressToken) from the JSON-RPC envelope into the params struct itselfRequestParamsMetaandTaskAugmentedRequestParamsMetatraits to model the spec's interface inheritanceUsed modelcontextprotocol/typescript-sdk#1086 as a reference implementation.
How Has This Been Tested?
_metafield serializes correctly with#[serde(rename = "_meta")]Breaking Changes
The existing code will compile with warnings with the migration path:
*RequestParamto*RequestParams(e.g.,CallToolRequestParam->CallToolRequestParams)meta: Option<Meta>field added to all param structs (defaults toNone)Thire is a compile-time breaking change, even when using the deprecated alias. When constructing structs directly (not via deserialization), users must now add
meta: None:Types of changes
Checklist
Additional context