pub trait Tool:
    Send
    + Sync
    + DynClone {
    // Required methods
    fn invoke<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        agent_context: &'life1 dyn AgentContext,
        raw_args: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn name(&self) -> &'static str;
    fn tool_spec(&self) -> ToolSpec;
    // Provided method
    fn boxed<'a>(self) -> Box<dyn Tool + 'a>
       where Self: Sized + 'a { ... }
}Required Methods§
fn invoke<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    agent_context: &'life1 dyn AgentContext,
    raw_args: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
fn name(&self) -> &'static str
fn tool_spec(&self) -> ToolSpec
Provided Methods§
Trait Implementations§
Source§impl PartialEq for Box<dyn Tool>
Tools are identified and unique by name
These allow comparison and lookups
 
impl PartialEq for Box<dyn Tool>
Tools are identified and unique by name These allow comparison and lookups