alexhancock/rmcp-tools-annotations (#3617)
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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>,
|
||||
},
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user