pub struct AvailableTool {
pub name: String,
pub description: String,
pub parameter_schema: Value,
pub source: ToolSource,
}Expand description
A tool available to an agent, with metadata about its origin.
Returned by AgentHandle::available_tools().
Includes tools from all sources: SDK builtins, custom Rust tools, and MCP
server tools.
Fields§
§name: StringTool name as seen by the model (e.g. "view_file", "get_weather").
description: StringHuman-readable description. Empty if the tool source didn’t provide one.
parameter_schema: ValueJSON Schema for the tool’s parameters. Value::Null if unavailable.
source: ToolSourceWhere this tool originates from.
Trait Implementations§
Source§impl Clone for AvailableTool
impl Clone for AvailableTool
Source§fn clone(&self) -> AvailableTool
fn clone(&self) -> AvailableTool
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 AvailableTool
impl Debug for AvailableTool
Source§impl<'de> Deserialize<'de> for AvailableTool
impl<'de> Deserialize<'de> for AvailableTool
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 Display for AvailableTool
impl Display for AvailableTool
Auto Trait Implementations§
impl Freeze for AvailableTool
impl RefUnwindSafe for AvailableTool
impl Send for AvailableTool
impl Sync for AvailableTool
impl Unpin for AvailableTool
impl UnsafeUnpin for AvailableTool
impl UnwindSafe for AvailableTool
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