Skip to main content

ToolRegistry

Trait ToolRegistry 

Source
pub trait ToolRegistry: Send + Sync {
    // Required method
    fn resolve(&self, tool_name: &str) -> Option<Arc<dyn Tool>>;

    // Provided method
    fn available_tools(&self) -> Vec<String> { ... }
}
Available on crate feature skills only.
Expand description

A registry that maps tool names to concrete tool instances.

Implementations resolve string identifiers (e.g. from a skill or config) into executable Arc<dyn Tool> instances.

Required Methods§

Source

fn resolve(&self, tool_name: &str) -> Option<Arc<dyn Tool>>

Resolve a tool name to a concrete tool instance. Returns None if the tool is not available in this registry.

Provided Methods§

Source

fn available_tools(&self) -> Vec<String>

Returns a list of all tool names available in this registry.

Implementors§