pub trait ToolInvoker: Send + Sync {
// Required methods
fn invoke<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn metadata(&self) -> ToolMetadata;
}Expand description
Tool invocation interface
This trait defines the interface for invoking tools. Implementations handle the actual tool execution and result formatting.
Required Methods§
Sourcefn invoke<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn metadata(&self) -> ToolMetadata
fn metadata(&self) -> ToolMetadata
Get metadata about this tool