pub struct Hints {
pub readonly: Option<bool>,
pub destructive: Option<bool>,
pub idempotent: Option<bool>,
pub open_world: Option<bool>,
pub long_running: Option<bool>,
pub concurrency_class: Option<String>,
pub metadata: Option<Value>,
}Expand description
Semantic and host-owned annotations for a capability tool.
Boolean values are Option<bool> so unspecified remains distinct from
false. Hints inform scheduling and clients; they do not grant authority.
Fields§
§readonly: Option<bool>The tool does not modify state.
destructive: Option<bool>The tool may irreversibly delete or destroy state.
idempotent: Option<bool>Repeating a call with the same arguments is safe.
open_world: Option<bool>The tool interacts with systems outside the local process.
long_running: Option<bool>The tool may commonly take more than a few seconds.
concurrency_class: Option<String>Calls sharing this non-empty key execute sequentially.
metadata: Option<Value>Host-owned annotations. Never include credentials or sensitive data.
Implementations§
Source§impl Hints
impl Hints
Sourcepub fn destructive(self, value: bool) -> Self
pub fn destructive(self, value: bool) -> Self
Mark whether the tool can destroy state.
Sourcepub fn idempotent(self, value: bool) -> Self
pub fn idempotent(self, value: bool) -> Self
Mark whether identical calls are safe to repeat.
Sourcepub fn open_world(self, value: bool) -> Self
pub fn open_world(self, value: bool) -> Self
Mark whether the tool reaches external systems.
Sourcepub fn long_running(self, value: bool) -> Self
pub fn long_running(self, value: bool) -> Self
Mark whether the tool is commonly long-running.
Sourcepub fn concurrency_class(self, value: impl Into<String>) -> Self
pub fn concurrency_class(self, value: impl Into<String>) -> Self
Serialize calls that share this scheduling class.