pub struct ToolAnnotations {
pub read_only: bool,
pub destructive: bool,
pub idempotent: bool,
pub egress: bool,
}Expand description
Effect hints that drive scheduling and policy.
The default is the conservative one: an unannotated tool is treated as mutating and destructive, so it runs alone and policies may ask before it runs. Mirrors MCP tool annotations.
Fields§
§read_only: boolNever changes anything outside the agent. Read-only calls in the same model turn run concurrently.
destructive: boolMay destroy or overwrite data, or act externally (send, deploy, pay).
idempotent: boolSafe to re-run with the same arguments (matters for resume/replay).
egress: boolSends data or acts outside the owner’s machine and workspace, or is irreversible (send, post, HTTP write, credentialed request, delete, standing-rule change, payment).
Implementations§
Trait Implementations§
Source§impl Clone for ToolAnnotations
impl Clone for ToolAnnotations
impl Copy for ToolAnnotations
Source§impl Debug for ToolAnnotations
impl Debug for ToolAnnotations
Source§impl Default for ToolAnnotations
impl Default for 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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ToolAnnotations
Source§impl PartialEq for ToolAnnotations
impl PartialEq for ToolAnnotations
Source§impl Serialize for ToolAnnotations
impl Serialize for ToolAnnotations
impl StructuralPartialEq for ToolAnnotations
Auto Trait Implementations§
impl Forget for ToolAnnotations
impl Freeze for ToolAnnotations
impl Move 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
Mutably borrows from an owned value. Read more