pub struct WriteFileTool;Expand description
Create or overwrite files.
Trait Implementations§
Source§impl Tool for WriteFileTool
impl Tool for WriteFileTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
One-line human-readable description shown to the model.
Source§fn parameters_schema(&self) -> Value
fn parameters_schema(&self) -> Value
JSON Schema description of the parameters object.
Must be a valid JSON object schema, e.g.: Read more
Source§fn execute(&self, args: &Value) -> Result<ToolResult, AgentError>
fn execute(&self, args: &Value) -> Result<ToolResult, AgentError>
Execute the tool with the given JSON arguments.
Returns the tool output as a string (will be injected back into the
conversation as the tool result).
Source§fn requires_permission(&self) -> bool
fn requires_permission(&self) -> bool
Whether this tool requires user permission before execution.
Defaults to
true for safety.Source§fn is_dangerous(&self, _args: &Value) -> bool
fn is_dangerous(&self, _args: &Value) -> bool
Whether this tool is considered dangerous (shown as a warning).
Auto Trait Implementations§
impl Freeze for WriteFileTool
impl RefUnwindSafe for WriteFileTool
impl Send for WriteFileTool
impl Sync for WriteFileTool
impl Unpin for WriteFileTool
impl UnsafeUnpin for WriteFileTool
impl UnwindSafe for WriteFileTool
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