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 new() -> ToolAnnotations
pub fn new() -> ToolAnnotations
Creates a new empty annotations struct.
Sourcepub fn destructive(self, value: bool) -> ToolAnnotations
pub fn destructive(self, value: bool) -> ToolAnnotations
Sets the destructive annotation.
Sourcepub fn idempotent(self, value: bool) -> ToolAnnotations
pub fn idempotent(self, value: bool) -> ToolAnnotations
Sets the idempotent annotation.
Sourcepub fn read_only(self, value: bool) -> ToolAnnotations
pub fn read_only(self, value: bool) -> ToolAnnotations
Sets the read_only annotation.
Sourcepub fn open_world_hint(self, hint: impl Into<String>) -> ToolAnnotations
pub fn open_world_hint(self, hint: impl Into<String>) -> ToolAnnotations
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolAnnotations
impl Debug for ToolAnnotations
Source§impl Default for ToolAnnotations
impl Default for ToolAnnotations
Source§fn default() -> ToolAnnotations
fn default() -> ToolAnnotations
Source§impl<'de> Deserialize<'de> for ToolAnnotations
impl<'de> Deserialize<'de> for ToolAnnotations
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolAnnotations, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolAnnotations, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ToolAnnotations
impl PartialEq for ToolAnnotations
Source§fn eq(&self, other: &ToolAnnotations) -> bool
fn eq(&self, other: &ToolAnnotations) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolAnnotations
impl Serialize for ToolAnnotations
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for ToolAnnotations
impl StructuralPartialEq for ToolAnnotations
Auto Trait Implementations§
impl Freeze for ToolAnnotations
impl RefUnwindSafe for ToolAnnotations
impl Send for ToolAnnotations
impl Sync for ToolAnnotations
impl Unpin for ToolAnnotations
impl UnsafeUnpin for ToolAnnotations
impl UnwindSafe for ToolAnnotations
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.