Fetch and extract the text content of any URL and inject it into the model's context.
Not yet available. The Web Fetch server tool is not yet available.
Web Fetch retrieves the text content of a URL and injects it into the conversation before the model generates a reply. It handles HTML stripping, Markdown extraction, and content truncation so the model receives clean, token-efficient input rather than raw markup.
The model determines which URL to fetch based on the conversation. It can also choose not to fetch if no URL is relevant.
You can instruct the gateway to pre-fetch a specific URL regardless of whether the model requests it:
With always_fetch: true, the content is injected at the start of the context before the model's first token is generated.
| Option | Type | Default | Description |
|---|---|---|---|
url | string | — | Pre-fetch this URL unconditionally |
always_fetch | boolean | false | Inject the URL even if the model didn't ask |
max_chars | integer | 20000 | Truncate extracted content at this character limit |
extract_mode | string | "markdown" | "markdown" (default), "plaintext", or "raw" |
The gateway strips navigation, ads, and boilerplate using an HTML-to-Markdown extractor. The result is a compact, readable representation of the page's primary content. Use "raw" only when you need exact HTML (counts heavily against your token budget).
By default any HTTPS URL may be fetched. You can restrict fetch targets to an allowlist in your workspace settings to prevent prompt-injection via attacker-controlled URLs.
Web Fetch charges a flat fee per URL fetched, plus the token cost of the injected content. Very large pages are truncated before billing, so max_chars is an effective cost control.