pub trait Tool: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn parameters(&self) -> Value;
fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for all tools that can be executed by the agent
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Human-readable description of what the tool does
Sourcefn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema describing the tool’s parameters