pub struct WebFetchTool;Expand description
Fetch a URL and return a coarse text representation of the response body.
Very intentionally simple: strips HTML tags by removing <...> sequences,
collapses whitespace, and truncates to a sensible size. For richer parsing,
upstream callers can install a custom tool.
Trait Implementations§
Source§impl AgentTool for WebFetchTool
impl AgentTool for WebFetchTool
fn name(&self) -> &str
fn description(&self) -> &str
fn parameters(&self) -> Value
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<AgentToolResult, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn label(&self) -> &str
Source§fn requires_permission(&self) -> bool
fn requires_permission(&self) -> bool
Whether the tool requires user permission by default. Read-only tools
(
read, ls, grep, glob) return false; mutating or side-effecting
tools (bash, write, edit) return true.Auto Trait Implementations§
impl Freeze for WebFetchTool
impl RefUnwindSafe for WebFetchTool
impl Send for WebFetchTool
impl Sync for WebFetchTool
impl Unpin for WebFetchTool
impl UnsafeUnpin for WebFetchTool
impl UnwindSafe for WebFetchTool
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