pub struct ToolMetadata {
pub name: String,
pub description: String,
pub origin: String,
pub version: String,
pub requirements: Vec<String>,
}Expand description
Machine-readable metadata for a registered tool — origin, version, and runtime requirements in a stable shape consumers can inspect without parsing the LLM-facing definition JSON.
Fields§
§name: StringTool name (matches Tool::name).
description: StringHuman-readable description (matches the description in Tool::definition).
origin: StringWhere this tool comes from: a crate name (e.g. "phi-tools"), a
framework identifier ("agent-base", "agent-works"), or
"custom" for user-defined tools.
version: StringCrate / package version, or "unknown" when built outside a crate.
requirements: Vec<String>Optional runtime requirements or capabilities this tool depends on
(e.g. ["chrome-cdp"] for browser tools). Empty when there are
none.
Trait Implementations§
Source§impl Clone for ToolMetadata
impl Clone for ToolMetadata
Source§fn clone(&self) -> ToolMetadata
fn clone(&self) -> ToolMetadata
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 ToolMetadata
impl Debug for ToolMetadata
Source§impl<'de> Deserialize<'de> for ToolMetadata
impl<'de> Deserialize<'de> for ToolMetadata
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ToolMetadata> for ToolMetadata
impl From<ToolMetadata> for ToolMetadata
Source§fn from(m: AgentToolMetadata) -> Self
fn from(m: AgentToolMetadata) -> Self
Converts to this type from the input type.
Source§impl Serialize for ToolMetadata
impl Serialize for ToolMetadata
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ToolMetadata
impl RefUnwindSafe for ToolMetadata
impl Send for ToolMetadata
impl Sync for ToolMetadata
impl Unpin for ToolMetadata
impl UnsafeUnpin for ToolMetadata
impl UnwindSafe for ToolMetadata
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