pub struct ToolAnnotations {
pub title: Option<String>,
pub audience: Option<Vec<String>>,
pub priority: Option<f64>,
pub destructive_hint: Option<bool>,
pub idempotent_hint: Option<bool>,
pub open_world_hint: Option<bool>,
pub read_only_hint: Option<bool>,
pub custom: HashMap<String, Value>,
}Expand description
Provides additional, optional metadata about a tool.
These annotations offer hints to clients and LLMs about the tool’s behavior, helping them make more informed decisions about when and how to use the tool.
Fields§
§title: Option<String>A user-friendly title for the tool, which may be used in UIs instead of the programmatic name.
audience: Option<Vec<String>>Specifies the intended audience for the tool (e.g., “developer”, “admin”).
priority: Option<f64>A numeric value indicating the tool’s priority, useful for sorting or ranking.
destructive_hint: Option<bool>If true, hints that the tool may perform destructive actions (e.g., deleting data).
idempotent_hint: Option<bool>If true, hints that calling the tool multiple times with the same arguments will not have additional effects.
open_world_hint: Option<bool>If true, hints that the tool may interact with external systems or the real world.
read_only_hint: Option<bool>If true, hints that the tool does not modify any state and only reads data.
custom: HashMap<String, Value>A map for any other custom annotations not defined in the specification.
Trait Implementations§
Source§impl Clone for ToolAnnotations
impl Clone for ToolAnnotations
Source§fn clone(&self) -> ToolAnnotations
fn clone(&self) -> ToolAnnotations
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more