chore: upgrade rmcp (#6516)

This commit is contained in:
Alex Hancock
2026-01-16 12:09:51 -05:00
committed by GitHub
parent 885fd2a24f
commit 4191826569
34 changed files with 157 additions and 26 deletions
@@ -43,6 +43,7 @@ impl ChatRecallClient {
let info = InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),
@@ -422,6 +422,7 @@ impl CodeExecutionClient {
let info = InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),
@@ -667,6 +668,7 @@ impl CodeExecutionClient {
let result = match extension_manager.as_ref().and_then(|w| w.upgrade()) {
Some(manager) => {
let tool_call = CallToolRequestParam {
task: None,
name: tool_name.into(),
arguments: serde_json::from_str(&arguments).ok(),
};
@@ -1634,6 +1634,7 @@ mod tests {
// verify a normal tool call
let tool_call = CallToolRequestParam {
task: None,
name: "test_client__tool".to_string().into(),
arguments: Some(object!({})),
};
@@ -1644,6 +1645,7 @@ mod tests {
assert!(result.is_ok());
let tool_call = CallToolRequestParam {
task: None,
name: "test_client__test__tool".to_string().into(),
arguments: Some(object!({})),
};
@@ -1655,6 +1657,7 @@ mod tests {
// verify a multiple underscores dispatch
let tool_call = CallToolRequestParam {
task: None,
name: "__cli__ent____tool".to_string().into(),
arguments: Some(object!({})),
};
@@ -1666,6 +1669,7 @@ mod tests {
// Test unicode in tool name, "client 🚀" should become "client_"
let tool_call = CallToolRequestParam {
task: None,
name: "client___tool".to_string().into(),
arguments: Some(object!({})),
};
@@ -1676,6 +1680,7 @@ mod tests {
assert!(result.is_ok());
let tool_call = CallToolRequestParam {
task: None,
name: "client___test__tool".to_string().into(),
arguments: Some(object!({})),
};
@@ -1687,6 +1692,7 @@ mod tests {
// this should error out, specifically for an ToolError::ExecutionError
let invalid_tool_call = CallToolRequestParam {
task: None,
name: "client___tools".to_string().into(),
arguments: Some(object!({})),
};
@@ -1712,6 +1718,7 @@ mod tests {
// this should error out, specifically with an ToolError::NotFound
// this client doesn't exist
let invalid_tool_call = CallToolRequestParam {
task: None,
name: "_client__tools".to_string().into(),
arguments: Some(object!({})),
};
@@ -1806,6 +1813,7 @@ mod tests {
// Try to call an unavailable tool
let unavailable_tool_call = CallToolRequestParam {
task: None,
name: "test_extension__tool".to_string().into(),
arguments: Some(object!({})),
};
@@ -1829,6 +1837,7 @@ mod tests {
// Try to call an available tool - should succeed
let available_tool_call = CallToolRequestParam {
task: None,
name: "test_extension__available_tool".to_string().into(),
arguments: Some(object!({})),
};
@@ -85,6 +85,7 @@ impl ExtensionManagerClient {
let info = InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),
@@ -233,6 +233,7 @@ mod tests {
let mut tool = FinalOutputTool::new(response);
let tool_call = CallToolRequestParam {
task: None,
name: FINAL_OUTPUT_TOOL_NAME.into(),
arguments: Some(object!({
"message": "Hello" // Missing required "count" field
@@ -255,6 +256,7 @@ mod tests {
let mut tool = FinalOutputTool::new(response);
let tool_call = CallToolRequestParam {
task: None,
name: FINAL_OUTPUT_TOOL_NAME.into(),
arguments: Some(object!({
"user": {
+1
View File
@@ -476,6 +476,7 @@ impl McpClientTrait for McpClient {
.send_request(
ClientRequest::CallToolRequest(CallToolRequest {
params: CallToolRequestParam {
task: None,
name: name.to_string().into(),
arguments,
},
+2
View File
@@ -117,6 +117,7 @@ mod tests {
.with_tool_request(
"search_1",
Ok(CallToolRequestParam {
task: None,
name: "search".into(),
arguments: None,
}),
@@ -135,6 +136,7 @@ mod tests {
.with_tool_request(
"search_2",
Ok(CallToolRequestParam {
task: None,
name: "search".into(),
arguments: None,
}),
@@ -45,6 +45,7 @@ impl SkillsClient {
let info = InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),
@@ -534,6 +535,7 @@ Content from dir3
info: InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),
@@ -576,6 +578,7 @@ Content from dir3
info: InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),
@@ -630,6 +633,7 @@ Content
info: InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),
@@ -698,6 +702,7 @@ Content
info: InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),
@@ -30,6 +30,7 @@ impl TodoClient {
let info = InitializeResult {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities {
tasks: None,
tools: Some(ToolsCapability {
list_changed: Some(false),
}),