API Reference
webFetchTool
function webFetchTool(backend): Tool;Defined in: tools/builtin/web.ts:81
Build a web_fetch tool bound to a backend.
Parameters
| Parameter | Type | Description |
|---|---|---|
backend | WebBackend | The WebBackend whose fetch performs the request. |
Returns
A Tool named web_fetch ready to pass to the agent loop or a ToolRegistry.
Remarks
Read-only by intent, but it dereferences a model-supplied URL — see the SSRF note on WebBackend. Keeps the default parallel execution mode; results are shaped by formatWebFetchResult.
See
Example
const tool = webFetchTool(myWebBackend);
await runAgent({ ...opts, tools: [tool] });
// The model can now call: web_fetch({ url: "https://example.com" })