pub struct ToolBehaviorHints {
pub read_only: Option<bool>,
pub destructive: Option<bool>,
pub idempotent: Option<bool>,
pub requires_auth: Option<bool>,
pub long_running: Option<bool>,
pub resource_intensive: Option<bool>,
pub cacheable: Option<bool>,
}
Expand description
Tool behavior hints for clients to understand tool characteristics
Fields§
§read_only: Option<bool>
Tool only reads data without making changes
destructive: Option<bool>
Tool makes destructive changes that cannot be easily undone
idempotent: Option<bool>
Tool produces the same output for the same input (no side effects)
requires_auth: Option<bool>
Tool requires authentication or special permissions
long_running: Option<bool>
Tool may take a long time to execute
resource_intensive: Option<bool>
Tool may consume significant system resources
cacheable: Option<bool>
Tool provides cacheable results
Implementations§
Source§impl ToolBehaviorHints
impl ToolBehaviorHints
Sourcepub fn destructive(self) -> Self
pub fn destructive(self) -> Self
Mark tool as destructive (makes changes that cannot be easily undone)
Sourcepub fn idempotent(self) -> Self
pub fn idempotent(self) -> Self
Mark tool as idempotent (same input produces same output)
Sourcepub fn requires_auth(self) -> Self
pub fn requires_auth(self) -> Self
Mark tool as requiring authentication
Sourcepub fn long_running(self) -> Self
pub fn long_running(self) -> Self
Mark tool as potentially long-running
Sourcepub fn resource_intensive(self) -> Self
pub fn resource_intensive(self) -> Self
Mark tool as resource-intensive
Trait Implementations§
Source§impl Clone for ToolBehaviorHints
impl Clone for ToolBehaviorHints
Source§fn clone(&self) -> ToolBehaviorHints
fn clone(&self) -> ToolBehaviorHints
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 ToolBehaviorHints
impl Debug for ToolBehaviorHints
Source§impl Default for ToolBehaviorHints
impl Default for ToolBehaviorHints
Source§fn default() -> ToolBehaviorHints
fn default() -> ToolBehaviorHints
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolBehaviorHints
impl<'de> Deserialize<'de> for ToolBehaviorHints
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ToolBehaviorHints> for ToolAnnotations
impl From<&ToolBehaviorHints> for ToolAnnotations
Source§fn from(hints: &ToolBehaviorHints) -> Self
fn from(hints: &ToolBehaviorHints) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ToolBehaviorHints
impl PartialEq for ToolBehaviorHints
Source§impl Serialize for ToolBehaviorHints
impl Serialize for ToolBehaviorHints
impl StructuralPartialEq for ToolBehaviorHints
Auto Trait Implementations§
impl Freeze for ToolBehaviorHints
impl RefUnwindSafe for ToolBehaviorHints
impl Send for ToolBehaviorHints
impl Sync for ToolBehaviorHints
impl Unpin for ToolBehaviorHints
impl UnwindSafe for ToolBehaviorHints
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