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 (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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ToolAnnotations
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more