pub trait ToolRegistry: Send + Sync {
// Required methods
fn register<'life0, 'async_trait>(
&'life0 self,
descriptor: ToolDescriptor,
) -> Pin<Box<dyn Future<Output = Result<(), IntentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn deregister<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IntentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ToolDescriptor>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<ToolDescriptor>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Authoritative catalog of every tool the host can dispatch to. The MCP host and native backends register here on mount; the router queries here when resolving a token.
Required Methods§
fn register<'life0, 'async_trait>(
&'life0 self,
descriptor: ToolDescriptor,
) -> Pin<Box<dyn Future<Output = Result<(), IntentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn deregister<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IntentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ToolDescriptor>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<ToolDescriptor>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".