pub struct ReadFileTool;Expand description
Read a file with optional line offset and limit. Returns line-numbered text so the model can reference specific lines in subsequent edits. Read-only.
Trait Implementations§
Source§impl ToolLike for ReadFileTool
impl ToolLike for ReadFileTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description shown to the model.
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
JSON Schema describing the tool’s arguments.
Source§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Whether this tool has no side effects. Read-only tools in the same
turn run concurrently; non-read-only tools run serially. Default:
false.Source§fn call<'a>(
&'a self,
input: Value,
ctx: &'a ToolContext,
) -> Pin<Box<dyn Future<Output = ProviderResult<ToolResult>> + Send + 'a>>
fn call<'a>( &'a self, input: Value, ctx: &'a ToolContext, ) -> Pin<Box<dyn Future<Output = ProviderResult<ToolResult>> + Send + 'a>>
Run the tool. The future is held by the agent loop and dropped on
cancellation; pair long-running work with
ToolContext::wait_for_cancel
in a tokio::select! to drop the losing branch promptly.Source§fn should_defer(&self) -> bool
fn should_defer(&self) -> bool
Whether the tool’s full definition is hidden until it is discovered
via
ToolSearchTool. Deferred tools appear to the model as
name-only stubs. Default: false.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