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
+4 -1
View File
@@ -207,7 +207,10 @@ async fn get_tools(
ToolInfo::new(
&tool.name,
&tool.description,
tool.description
.as_ref()
.map(|d| d.as_ref())
.unwrap_or_default(),
get_parameter_names(&tool),
permission,
)
+2 -1
View File
@@ -8,6 +8,7 @@ use crate::state::AppState;
use axum::{extract::State, routing::post, Json, Router};
use goose::agents::{extension::Envs, ExtensionConfig};
use http::{HeaderMap, StatusCode};
use rmcp::model::Tool;
use serde::{Deserialize, Serialize};
use tracing;
@@ -80,7 +81,7 @@ enum ExtensionConfigRequest {
/// The name to identify this extension
name: String,
/// The tools provided by this extension
tools: Vec<mcp_core::tool::Tool>,
tools: Vec<Tool>,
/// Optional instructions for using the tools
instructions: Option<String>,
},
+1 -2
View File
@@ -404,7 +404,6 @@ mod tests {
errors::ProviderError,
},
};
use mcp_core::tool::Tool;
#[derive(Clone)]
struct MockProvider {
@@ -421,7 +420,7 @@ mod tests {
&self,
_system: &str,
_messages: &[Message],
_tools: &[Tool],
_tools: &[rmcp::model::Tool],
) -> anyhow::Result<(Message, ProviderUsage), ProviderError> {
Ok((
Message::assistant().with_text("Mock response"),