Implement SEP-1319: Decouple Request Payload from RPC Methods (#617)

* feat: implement SEP-1319 Decouple Request Payload from RPC Methods

* test: update tests

* fix: update handler trait methods to use new types

* fix: update examples

* fix: correct deprecation version

* fix: update wrapper macros to use new *Params type names
This commit is contained in:
Dale Seo 2026-01-16 12:16:52 -05:00 • committed by GitHub
commit 9e881a645b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ use std::sync::Arc;
use rmcp::{
ClientHandler, ServerHandler, ServiceExt,
handler::server::{router::tool::ToolRouter, wrapper::Parameters},
model::{CallToolRequestParam, ClientInfo},
model::{CallToolRequestParams, ClientInfo},
tool, tool_handler, tool_router,
};
use schemars::JsonSchema;
@ -309,7 +309,8 @@ async fn test_optional_i64_field_with_null_input() -> anyhow::Result<()> {
// Test null case
let result = client
.call_tool(CallToolRequestParam {
.call_tool(CallToolRequestParams {
meta: None,
name: "test_optional_i64".into(),
arguments: Some(
serde_json::json!({
@ -338,7 +339,8 @@ async fn test_optional_i64_field_with_null_input() -> anyhow::Result<()> {
// Test Some case
let some_result = client
.call_tool(CallToolRequestParam {
.call_tool(CallToolRequestParams {
meta: None,
name: "test_optional_i64".into(),
arguments: Some(
serde_json::json!({