pub struct ToolAnnotations {
pub title: Option<String>,
pub read_only_hint: Option<bool>,
pub destructive_hint: Option<bool>,
pub idempotent_hint: Option<bool>,
pub open_world_hint: Option<bool>,
}Expand description
Tool annotations provide metadata about tool behavior
Fields§
§title: Option<String>Human-readable title for the tool, useful for UI display
read_only_hint: Option<bool>If true, indicates the tool does not modify its environment
destructive_hint: Option<bool>If true, the tool may perform destructive updates (only meaningful when readOnlyHint is false)
idempotent_hint: Option<bool>If true, calling the tool repeatedly with the same arguments has no additional effect (only meaningful when readOnlyHint is false)
open_world_hint: Option<bool>If true, the tool may interact with an “open world” of external entities
Implementations§
Source§impl ToolAnnotations
impl ToolAnnotations
Sourcepub fn read_only() -> ToolAnnotations
pub fn read_only() -> ToolAnnotations
Create a new read-only tool annotation
Sourcepub fn destructive() -> ToolAnnotations
pub fn destructive() -> ToolAnnotations
Create a new destructive tool annotation
Sourcepub fn idempotent() -> ToolAnnotations
pub fn idempotent() -> ToolAnnotations
Create a new idempotent tool annotation
Sourcepub fn open_world() -> ToolAnnotations
pub fn open_world() -> ToolAnnotations
Create a new open-world tool annotation
Sourcepub fn with_title(self, title: String) -> ToolAnnotations
pub fn with_title(self, title: String) -> ToolAnnotations
Set the title
Sourcepub fn with_read_only_hint(self, read_only: bool) -> ToolAnnotations
pub fn with_read_only_hint(self, read_only: bool) -> ToolAnnotations
Set read-only hint
Sourcepub fn with_destructive_hint(self, destructive: bool) -> ToolAnnotations
pub fn with_destructive_hint(self, destructive: bool) -> ToolAnnotations
Set destructive hint
Sourcepub fn with_idempotent_hint(self, idempotent: bool) -> ToolAnnotations
pub fn with_idempotent_hint(self, idempotent: bool) -> ToolAnnotations
Set idempotent hint
Sourcepub fn with_open_world_hint(self, open_world: bool) -> ToolAnnotations
pub fn with_open_world_hint(self, open_world: bool) -> ToolAnnotations
Set open-world hint
Trait Implementations§
Source§impl Clone for ToolAnnotations
impl Clone for ToolAnnotations
Source§fn clone(&self) -> ToolAnnotations
fn clone(&self) -> ToolAnnotations
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ToolAnnotations
impl RefUnwindSafe for ToolAnnotations
impl Send for ToolAnnotations
impl Sync for ToolAnnotations
impl Unpin 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
Mutably borrows from an owned value. Read more