mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-19 15:14:21 +01:00
feat: add tool annotations for build-in tools (#1939)
This commit is contained in:
@@ -5,6 +5,7 @@ use goose::config::extensions::name_to_key;
|
||||
use goose::config::{Config, ConfigError, ExperimentManager, ExtensionEntry, ExtensionManager};
|
||||
use goose::message::Message;
|
||||
use goose::providers::{create, providers};
|
||||
use mcp_core::tool::ToolAnnotations;
|
||||
use mcp_core::Tool;
|
||||
use serde_json::{json, Value};
|
||||
use std::collections::HashMap;
|
||||
@@ -349,6 +350,13 @@ pub async fn configure_provider_dialog() -> Result<bool, Box<dyn Error>> {
|
||||
"location": {"type": "string"}
|
||||
}
|
||||
}),
|
||||
Some(ToolAnnotations {
|
||||
title: Some("Get weather".to_string()),
|
||||
read_only_hint: true,
|
||||
destructive_hint: false,
|
||||
idempotent_hint: false,
|
||||
open_world_hint: false,
|
||||
}),
|
||||
);
|
||||
vec![sample_tool]
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user