pub struct WebFetchTool;Expand description
P4c (S2 module 5 tools.web, S4a “trivially addable… single tool
each, no loop changes”): fetch a URL and return it AS MARKDOWN (BP-2,
catalog:44 “Fetch a URL, convert to markdown, return to model”), served
from an on-disk cache within [WEB_FETCH_TTL_SECS] of the last fetch —
CC’s WebFetch is markdown-converting and cached, and a model that
re-fetches the same page mid-task should not pay for it twice. NOT
registered by default — only reached via [capabilities.tools_web]
(module 5), off by default (§3.1). SECURITY (S2.1 S17): honors
ToolContext::network_policy when one is configured (see
ToolContext::check_network) — a caller (SDK embedder) that has set up
a sandbox/network policy on the context gets it enforced here too; with
no policy configured (today’s honest default), the fetch is
unrestricted, same posture as every other network-capable path in this
crate today (C3).
Trait Implementations§
Source§impl Tool for WebFetchTool
impl Tool for WebFetchTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
crate::Config.