Swap MCP client implementations to rmcp (#3634)

This commit is contained in:
Jack Amadeo
2025-08-01 17:14:41 -04:00
committed by GitHub
parent 7b67007a54
commit 6b3018b77a
30 changed files with 625 additions and 3263 deletions
+6 -13
View File
@@ -335,8 +335,7 @@ pub fn create_request(
#[cfg(test)]
mod tests {
use super::*;
use rmcp::model::Content;
use rmcp::object;
use rmcp::{model::Content, object};
use serde_json::json;
fn set_up_text_message(text: &str, role: Role) -> Message {
@@ -680,18 +679,12 @@ mod tests {
#[test]
fn test_tools_to_google_spec_with_empty_properties() {
use rmcp::model::object;
use std::borrow::Cow;
use std::sync::Arc;
let schema = json!({
"properties": {}
});
let tools = vec![Tool::new(
Cow::Borrowed("tool1"),
Cow::Borrowed("description1"),
Arc::new(object(schema)),
"tool1".to_string(),
"description1".to_string(),
object!({
"properties": {}
}),
)];
let result = format_tools(&tools);
assert_eq!(result.len(), 1);