pub trait ToolHandler:
Send
+ Sync
+ 'static {
// Required methods
fn list(&self) -> Pin<Box<dyn Future<Output = Vec<ToolDef>> + Send + '_>>;
fn call(
&self,
name: &str,
args: &[u8],
metadata: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, String>> + Send + '_>>;
}Expand description
Tool handler trait
Implement this trait to handle tool operations.