Web Fetch
The Web Fetch extension gives the agent the ability to fetch and read public web pages. A single clean tool: web_fetch.
What It Does
The agent can fetch any public URL and return its content in the most useful format:
| Format | Use Case |
|---|---|
| markdown (default) | Read documentation, blog posts, articles |
| text | Extract plain text content |
| html | Get raw HTML for analysis |
| json | Fetch JSON APIs directly |
Usage
web_fetch {
url: "https://docs.example.com/api-reference",
format: "markdown"
}
The tool handles redirects automatically and rejects binary content (images, PDFs, etc.). It enforces SSRF protection — private and internal IPs are blocked.
Typical Workflows
Reading Documentation
The agent can fetch documentation pages to understand APIs, libraries, and frameworks before writing code:
"Check the Next.js 14 routing docs and update our layout based on the latest patterns."
Consuming API References
Fetch JSON endpoints directly:
web_fetch {
url: "https://api.github.com/repos/owner/repo/releases/latest",
format: "json"
}
Research & Context
Before implementing a feature, the agent can fetch relevant blog posts, Stack Overflow answers, or RFC documents to gather context.
Safety
- SSRF protection — private/internal IPs (127.0.0.1, 10.x, 192.168.x, etc.) are blocked
- HTTP/HTTPS only — no file:// or other protocols
- Timeout — configurable up to 120 seconds (default 30s)
- Binary rejection — non-text content is rejected automatically
Configuration
| Setting | Default | Description |
|---|---|---|
timeout | 30 | Request timeout in seconds (max 120) |
userAgent | Default | User agent string for requests |
When to Use
- Reading documentation — fetch library docs before writing integrations
- API exploration — inspect REST/JSON endpoints
- Research — gather context from web articles
- Content extraction — read blog posts, READMEs, changelogs