pub struct ToolDef {
pub name: &'static str,
pub description: &'static str,
pub parameters: Vec<ToolParam>,
pub execute: fn(args: &Value, workspace_dir: &Path) -> Result<String, String>,
}Expand description
A tool that the agent can invoke.
Fields§
§name: &'static str§description: &'static str§parameters: Vec<ToolParam>§execute: fn(args: &Value, workspace_dir: &Path) -> Result<String, String>The function that executes the tool, returning a string result or error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolDef
impl RefUnwindSafe for ToolDef
impl Send for ToolDef
impl Sync for ToolDef
impl Unpin for ToolDef
impl UnsafeUnpin for ToolDef
impl UnwindSafe for ToolDef
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