pub struct ToolDefinition {Show 15 fields
pub id: String,
pub name: String,
pub description: String,
pub version: String,
pub capability: ToolCapability,
pub input_schema: Value,
pub output_schema: Value,
pub bindings: Vec<ToolBinding>,
pub safety: ToolSafety,
pub resources: ToolResources,
pub trust: ToolTrust,
pub visibility: ToolVisibility,
pub required_capabilities: Vec<String>,
pub tier: Option<ToolTier>,
pub errors: Vec<ToolErrorDef>,
}Fields§
§id: String§name: String§description: String§version: String§capability: ToolCapability§input_schema: Value§output_schema: Value§bindings: Vec<ToolBinding>§safety: ToolSafety§resources: ToolResources§trust: ToolTrust§visibility: ToolVisibility§required_capabilities: Vec<String>Capabilities a caller must hold for this tool to be invoked.
Enforced by the server’s dispatch layer (SP-12). Empty = unrestricted.
The existing capability field above is a descriptor (domain, actions,
intent examples); this is the enforcement list — intentionally
separate to avoid overloading the schema.
tier: Option<ToolTier>Execution tier hint used by the dispatch layer to derive deadline and
max-output budgets. Absent / unknown values default to Warm on the
server side (SP-12 back-compat). The client-facing ToolSummary carries
an equivalent field.
errors: Vec<ToolErrorDef>Domain errors this tool may emit. Optional; missing on the wire =
empty. Surfaces only via describe, never via discover (kept off
ToolSummary).
Trait Implementations§
Source§impl Clone for ToolDefinition
impl Clone for ToolDefinition
Source§fn clone(&self) -> ToolDefinition
fn clone(&self) -> ToolDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ToolDefinition
impl Debug for ToolDefinition
Source§impl<'de> Deserialize<'de> for ToolDefinition
impl<'de> Deserialize<'de> for ToolDefinition
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<&ToolDefinition> for ToolSummary
impl From<&ToolDefinition> for ToolSummary
Source§fn from(def: &ToolDefinition) -> Self
fn from(def: &ToolDefinition) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ToolDefinition
impl RefUnwindSafe for ToolDefinition
impl Send for ToolDefinition
impl Sync for ToolDefinition
impl Unpin for ToolDefinition
impl UnsafeUnpin for ToolDefinition
impl UnwindSafe for ToolDefinition
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