pub trait ToolProvider:
Send
+ Sync
+ 'static {
// Required methods
fn tool_manifests(&self) -> Vec<ToolManifest>;
fn resolve_contract(&self, name: &str) -> Option<Arc<ToolContract>>;
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
call: ToolCall<'life1>,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn resolve_manifest(&self, name: &str) -> Option<ToolManifest> { ... }
}Expand description
Trait for providing tools to the sandbox. Implement this per-project.
Implementations supply cheap ToolManifests, lazily resolved
ToolContracts, and a single
execute method that handles every call. Tools that
need session state read it from call.context; tools that stream
progress send through call.progress.