alexhancock/rmcp-tools-annotations (#3617)
This commit is contained in:
@@ -448,6 +448,8 @@ mod schedule_tool_tests {
|
||||
let tool = schedule_tool.unwrap();
|
||||
assert!(tool
|
||||
.description
|
||||
.clone()
|
||||
.unwrap_or_default()
|
||||
.contains("Manage scheduled recipe execution"));
|
||||
}
|
||||
|
||||
@@ -478,6 +480,8 @@ mod schedule_tool_tests {
|
||||
let tool = schedule_tool.unwrap();
|
||||
assert!(tool
|
||||
.description
|
||||
.clone()
|
||||
.unwrap_or_default()
|
||||
.contains("Manage scheduled recipe execution"));
|
||||
|
||||
// Verify the tool has the expected actions in its schema
|
||||
@@ -548,7 +552,7 @@ mod final_output_tool_tests {
|
||||
use goose::model::ModelConfig;
|
||||
use goose::providers::base::{Provider, ProviderUsage, Usage};
|
||||
use goose::providers::errors::ProviderError;
|
||||
use mcp_core::tool::Tool;
|
||||
use rmcp::model::Tool;
|
||||
|
||||
#[derive(Clone)]
|
||||
struct MockProvider {
|
||||
@@ -648,7 +652,7 @@ mod final_output_tool_tests {
|
||||
use goose::model::ModelConfig;
|
||||
use goose::providers::base::{Provider, ProviderUsage};
|
||||
use goose::providers::errors::ProviderError;
|
||||
use mcp_core::tool::Tool;
|
||||
use rmcp::model::Tool;
|
||||
|
||||
#[derive(Clone)]
|
||||
struct MockProvider {
|
||||
@@ -769,7 +773,7 @@ mod retry_tests {
|
||||
use goose::model::ModelConfig;
|
||||
use goose::providers::base::{Provider, ProviderUsage, Usage};
|
||||
use goose::providers::errors::ProviderError;
|
||||
use mcp_core::tool::Tool;
|
||||
use rmcp::model::Tool;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -950,7 +954,8 @@ mod max_turns_tests {
|
||||
use goose::providers::base::{Provider, ProviderMetadata, ProviderUsage, Usage};
|
||||
use goose::providers::errors::ProviderError;
|
||||
use goose::session::storage::Identifier;
|
||||
use mcp_core::tool::{Tool, ToolCall};
|
||||
use mcp_core::tool::ToolCall;
|
||||
use rmcp::model::Tool;
|
||||
use std::path::PathBuf;
|
||||
|
||||
struct MockToolProvider {}
|
||||
|
||||
@@ -7,8 +7,9 @@ use goose::providers::{
|
||||
anthropic, azure, bedrock, databricks, google, groq, litellm, ollama, openai, openrouter,
|
||||
snowflake, xai,
|
||||
};
|
||||
use mcp_core::tool::Tool;
|
||||
use rmcp::model::Tool;
|
||||
use rmcp::model::{AnnotateAble, Content, RawImageContent};
|
||||
use rmcp::object;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
@@ -118,7 +119,7 @@ impl ProviderTester {
|
||||
let weather_tool = Tool::new(
|
||||
"get_weather",
|
||||
"Get the weather for a location",
|
||||
serde_json::json!({
|
||||
object!({
|
||||
"type": "object",
|
||||
"required": ["location"],
|
||||
"properties": {
|
||||
@@ -128,7 +129,6 @@ impl ProviderTester {
|
||||
}
|
||||
}
|
||||
}),
|
||||
None,
|
||||
);
|
||||
|
||||
let message = Message::user().with_text("What's the weather like in San Francisco?");
|
||||
@@ -309,11 +309,10 @@ impl ProviderTester {
|
||||
let screenshot_tool = Tool::new(
|
||||
"get_screenshot",
|
||||
"Get a screenshot of the current screen",
|
||||
serde_json::json!({
|
||||
object!({
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}),
|
||||
None,
|
||||
);
|
||||
|
||||
let user_message = Message::user().with_text("Take a screenshot please");
|
||||
|
||||
Reference in New Issue
Block a user