pub trait Tool {
// Required methods
fn info(&self) -> &ToolInfo;
fn call<'life0, 'async_trait>(
&'life0 self,
ctx: AgentContext,
args: AgentValue,
) -> Pin<Box<dyn Future<Output = Result<AgentValue, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for Tool implementations.
Required Methods§
fn info(&self) -> &ToolInfo
Sourcefn call<'life0, 'async_trait>(
&'life0 self,
ctx: AgentContext,
args: AgentValue,
) -> Pin<Box<dyn Future<Output = Result<AgentValue, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
ctx: AgentContext,
args: AgentValue,
) -> Pin<Box<dyn Future<Output = Result<AgentValue, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Call the tool with the given context and arguments.