feat: mcp router disable extensions (#2319)
This commit is contained in:
@@ -6,7 +6,7 @@ pub const PLATFORM_READ_RESOURCE_TOOL_NAME: &str = "platform__read_resource";
|
||||
pub const PLATFORM_LIST_RESOURCES_TOOL_NAME: &str = "platform__list_resources";
|
||||
pub const PLATFORM_SEARCH_AVAILABLE_EXTENSIONS_TOOL_NAME: &str =
|
||||
"platform__search_available_extensions";
|
||||
pub const PLATFORM_ENABLE_EXTENSION_TOOL_NAME: &str = "platform__enable_extension";
|
||||
pub const PLATFORM_MANAGE_EXTENSIONS_TOOL_NAME: &str = "platform__manage_extensions";
|
||||
|
||||
pub fn read_resource_tool() -> Tool {
|
||||
Tool::new(
|
||||
@@ -87,22 +87,24 @@ pub fn search_available_extensions_tool() -> Tool {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn enable_extension_tool() -> Tool {
|
||||
pub fn manage_extensions_tool() -> Tool {
|
||||
Tool::new(
|
||||
PLATFORM_ENABLE_EXTENSION_TOOL_NAME.to_string(),
|
||||
"Enable extensions to help complete tasks.
|
||||
Enable an extension by providing the extension name.
|
||||
PLATFORM_MANAGE_EXTENSIONS_TOOL_NAME.to_string(),
|
||||
"Tool to manage extensions and tools in goose context.
|
||||
Enable or disable extensions to help complete tasks.
|
||||
Enable or disable an extension by providing the extension name.
|
||||
"
|
||||
.to_string(),
|
||||
json!({
|
||||
"type": "object",
|
||||
"required": ["extension_name"],
|
||||
"required": ["action", "extension_name"],
|
||||
"properties": {
|
||||
"action": {"type": "string", "description": "The action to perform", "enum": ["enable", "disable"]},
|
||||
"extension_name": {"type": "string", "description": "The name of the extension to enable"}
|
||||
}
|
||||
}),
|
||||
Some(ToolAnnotations {
|
||||
title: Some("Enable extensions".to_string()),
|
||||
title: Some("Enable or disable an extension".to_string()),
|
||||
read_only_hint: false,
|
||||
destructive_hint: false,
|
||||
idempotent_hint: false,
|
||||
|
||||
Reference in New Issue
Block a user