pub struct ToolRegistry { /* private fields */ }
Expand description
Tool discovery and management system
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn register_tool(&mut self, tool: Tool) -> McpResult<()>
pub fn register_tool(&mut self, tool: Tool) -> McpResult<()>
Register a tool in the registry
Sourcepub fn unregister_tool(&mut self, name: &str) -> McpResult<Tool>
pub fn unregister_tool(&mut self, name: &str) -> McpResult<Tool>
Unregister a tool from the registry
Sourcepub fn get_tool_mut(&mut self, name: &str) -> Option<&mut Tool>
pub fn get_tool_mut(&mut self, name: &str) -> Option<&mut Tool>
Get a mutable reference to a tool by name
Sourcepub fn list_tool_names(&self) -> Vec<String>
pub fn list_tool_names(&self) -> Vec<String>
List all tool names
Sourcepub fn discover_tools(
&self,
criteria: &DiscoveryCriteria,
) -> Vec<DiscoveryResult>
pub fn discover_tools( &self, criteria: &DiscoveryCriteria, ) -> Vec<DiscoveryResult>
Discover tools based on criteria
Sourcepub fn get_tools_by_category(&self, filter: &CategoryFilter) -> Vec<String>
pub fn get_tools_by_category(&self, filter: &CategoryFilter) -> Vec<String>
Get tools by category
Sourcepub fn get_deprecated_tools(&self) -> Vec<String>
pub fn get_deprecated_tools(&self) -> Vec<String>
Get deprecated tools
Sourcepub fn get_disabled_tools(&self) -> Vec<String>
pub fn get_disabled_tools(&self) -> Vec<String>
Get disabled tools
Sourcepub fn get_performance_report(&self) -> HashMap<String, ToolPerformanceMetrics>
pub fn get_performance_report(&self) -> HashMap<String, ToolPerformanceMetrics>
Get performance report for all tools
Sourcepub fn get_global_stats(&self) -> &GlobalToolStats
pub fn get_global_stats(&self) -> &GlobalToolStats
Get global statistics
Sourcepub fn recommend_tool(
&self,
use_case: &str,
criteria: &DiscoveryCriteria,
) -> Option<DiscoveryResult>
pub fn recommend_tool( &self, use_case: &str, criteria: &DiscoveryCriteria, ) -> Option<DiscoveryResult>
Recommend best tool for a specific use case
Sourcepub fn cleanup_deprecated_tools(
&mut self,
policy: &DeprecationCleanupPolicy,
) -> Vec<String>
pub fn cleanup_deprecated_tools( &mut self, policy: &DeprecationCleanupPolicy, ) -> Vec<String>
Clean up deprecated tools based on policy
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolRegistry
impl !RefUnwindSafe for ToolRegistry
impl Send for ToolRegistry
impl Sync for ToolRegistry
impl Unpin for ToolRegistry
impl !UnwindSafe for ToolRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more