pub trait ToolDispatcher: Send + Sync {
// Required method
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Runs a single tool call on behalf of a provider’s tool loop. The provider
parses the model’s tool call (name + JSON args) and calls this; the
implementor (the executor) maps the name to an adapter action, runs it, and
returns the result payload - or an Err string that is fed back to the
model as the tool result so it can recover.