pub struct ReadFileTool;Expand description
Read file contents with line numbers.
Trait Implementations§
Source§impl Tool for ReadFileTool
impl Tool for ReadFileTool
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 ReadFileTool
impl RefUnwindSafe for ReadFileTool
impl Send for ReadFileTool
impl Sync for ReadFileTool
impl Unpin for ReadFileTool
impl UnsafeUnpin for ReadFileTool
impl UnwindSafe for ReadFileTool
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