pub trait Tool: Send + Sync {
// Required methods
fn definition(&self) -> ToolDefinition;
fn execute<'life0, 'async_trait>(
&'life0 self,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn risk_level(&self) -> RiskLevel { ... }
}Required Methods§
fn definition(&self) -> ToolDefinition
fn execute<'life0, 'async_trait>(
&'life0 self,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn risk_level(&self) -> RiskLevel
fn risk_level(&self) -> RiskLevel
Risk level of this tool. Defaults to Safe (read-only). Override in tools that modify state.