pub struct ToolAnnotations {
pub destructive: Option<bool>,
pub idempotent: Option<bool>,
pub read_only: Option<bool>,
pub open_world_hint: Option<String>,
}Expand description
Tool annotations for additional metadata.
These annotations provide hints about tool behavior to help clients make informed decisions about tool usage.
Fields§
§destructive: Option<bool>Whether the tool may cause destructive side effects. True means the tool modifies external state (e.g., deleting files).
idempotent: Option<bool>Whether the tool is idempotent (safe to retry without side effects). True means calling the tool multiple times has the same effect as calling it once.
read_only: Option<bool>Whether the tool is read-only (has no side effects). True means the tool only reads data without modifying anything.
open_world_hint: Option<String>Hint about the tool’s behavior with unknown inputs. Can be used to indicate how the tool handles inputs not explicitly defined.
Implementations§
Source§impl ToolAnnotations
impl ToolAnnotations
Sourcepub fn destructive(self, value: bool) -> Self
pub fn destructive(self, value: bool) -> Self
Sets the destructive annotation.
Sourcepub fn idempotent(self, value: bool) -> Self
pub fn idempotent(self, value: bool) -> Self
Sets the idempotent annotation.
Sourcepub fn open_world_hint(self, hint: impl Into<String>) -> Self
pub fn open_world_hint(self, hint: impl Into<String>) -> Self
Sets the open_world_hint annotation.
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