Swap MCP client implementations to rmcp (#3634)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user