alexhancock/rmcp-tools-annotations (#3617)

This commit is contained in:
Alex Hancock
2025-07-24 14:58:14 -04:00
committed by GitHub
parent 7b2ca43c77
commit b4fc6f7cc8
65 changed files with 770 additions and 731 deletions
+5 -4
View File
@@ -5,8 +5,9 @@ use goose::{
message::Message,
providers::{bedrock::BedrockProvider, databricks::DatabricksProvider, openai::OpenAiProvider},
};
use mcp_core::tool::{Tool, ToolCall};
use rmcp::model::Content;
use mcp_core::tool::ToolCall;
use rmcp::model::{Content, Tool};
use rmcp::object;
use serde_json::json;
use std::fs;
@@ -42,7 +43,7 @@ async fn main() -> Result<()> {
];
// Get a response from the model about the image
let input_schema = json!({
let input_schema = object!({
"type": "object",
"required": ["path"],
"properties": {
@@ -57,7 +58,7 @@ async fn main() -> Result<()> {
.complete(
"You are a helpful assistant. Please describe any text you see in the image.",
&messages,
&[Tool::new("view_image", "View an image", input_schema, None)],
&[Tool::new("view_image", "View an image", input_schema)],
)
.await?;