feat: add tool annotations for build-in tools (#1939)

This commit is contained in:
Yingjie He
2025-03-31 16:46:55 -07:00
committed by GitHub
parent f184449f81
commit 680523297b
23 changed files with 369 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ use mcp_core::{
protocol::ServerCapabilities,
resource::Resource,
role::Role,
tool::Tool,
tool::{Tool, ToolAnnotations},
};
use mcp_server::router::CapabilitiesBuilder;
use mcp_server::Router;
@@ -45,6 +45,13 @@ impl TutorialRouter {
}
}
}),
Some(ToolAnnotations {
title: Some("Load Tutorial".to_string()),
read_only_hint: true,
destructive_hint: false,
idempotent_hint: false,
open_world_hint: false,
}),
);
// Get base instructions and available tutorials