pub struct ToolManager {
pub tools: Arc<RwLock<HashMap<String, Arc<dyn ToolProvider>>>>,
pub capabilities: ToolCapabilities,
}
Fields§
§tools: Arc<RwLock<HashMap<String, Arc<dyn ToolProvider>>>>
§capabilities: ToolCapabilities
Implementations§
Source§impl ToolManager
impl ToolManager
pub fn new(capabilities: ToolCapabilities) -> Self
pub async fn register_tool(&self, provider: Arc<dyn ToolProvider>)
pub async fn list_tools( &self, _cursor: Option<String>, ) -> Result<ListToolsResponse, McpError>
pub async fn call_tool( &self, name: &str, arguments: Value, ) -> Result<ToolResult, McpError>
Auto Trait Implementations§
impl Freeze for ToolManager
impl !RefUnwindSafe for ToolManager
impl Send for ToolManager
impl Sync for ToolManager
impl Unpin for ToolManager
impl !UnwindSafe for ToolManager
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