pub struct ToolBox { /* private fields */ }Implementations§
Source§impl ToolBox
impl ToolBox
pub fn new() -> Self
pub async fn load_mcpconfig( &mut self, path: impl AsRef<Path>, ) -> AgentResult<()>
pub fn add_tool<T: Tool + 'static>(&mut self, tool: T)
pub fn add_tool_box(&mut self, tool: Box<dyn Tool>)
pub async fn add_mcp_server<I, S>(&mut self, cmd: S, args: I) -> AgentResult<()>
pub async fn execute_tool( &mut self, name: &str, arguments: &str, ) -> AgentResult<ToolCallResult>
pub fn tool_definitions(&self) -> &[ToolDefinition]
Auto Trait Implementations§
impl !RefUnwindSafe for ToolBox
impl !UnwindSafe for ToolBox
impl Freeze for ToolBox
impl Send for ToolBox
impl Sync for ToolBox
impl Unpin for ToolBox
impl UnsafeUnpin for ToolBox
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