pub trait ToolProvider: Send + Sync {
// Required methods
fn discover_tools(
&self,
) -> BoxFuture<'_, Result<Vec<Arc<dyn Tool>>, SynwireError>>;
fn get_tool(
&self,
name: &str,
) -> BoxFuture<'_, Result<Option<Arc<dyn Tool>>, SynwireError>>;
}Expand description
Abstracts over sources of tools.
Implementations include:
StaticToolProvider— wraps a fixed list.CompositeToolProvider— aggregates multiple providers.McpToolProvider(insynwire-mcp-adapters) — sources tools from MCP servers.
Required Methods§
Sourcefn discover_tools(
&self,
) -> BoxFuture<'_, Result<Vec<Arc<dyn Tool>>, SynwireError>>
fn discover_tools( &self, ) -> BoxFuture<'_, Result<Vec<Arc<dyn Tool>>, SynwireError>>
Returns all tools available from this provider.
§Errors
Returns SynwireError if tool discovery fails (e.g. network error).