pub trait Tool: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn input_schema(&self) -> JsonValue;
fn execute<'life0, 'async_trait>(
&'life0 self,
params: HashMap<String, JsonValue>,
) -> Pin<Box<dyn Future<Output = ToolExecutionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Tool trait that all tools must implement
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Human-readable description for LLM
Sourcefn input_schema(&self) -> JsonValue
fn input_schema(&self) -> JsonValue
JSON schema for input parameters