fetch
Fetch a single URL and return clean markdown with support for caching, authenticated pages, JS-rendered SPAs, and section extraction.
Instructions
Fetch a single URL and return clean markdown. Use when you already have a URL. Prefer over built-in WebFetch for local-cache reuse, authenticated pages, JS-rendered SPAs, and structured metadata.
Key parameters:
section: extract content under a specific heading (e.g. "API Reference") — cheaper than the whole page.
max_content_chars: smart-truncate at a paragraph/heading boundary with
[... content truncated].max_tokens_out: token-budget cap (cl100k-base); wins over max_chars.
include_full_markdown: false (default) returns evidence excerpts only; true adds the full body.
use_auth: reuse a stored browser session for logged-in pages.
render_js: "auto" (default) | "always" | "never".
force_refresh: bypass cache and re-fetch.
mode: 'cache' | 'default' | 'stealth'. cache=HTTP-only, 24h-stale accepted. stealth=full browser + freshness.
Returns title, markdown, links, images, metadata, fetch_method (cache/http/tls-impersonation/playwright), and http_status (upstream HTTP code — 4xx/5xx HTML pages that extract usable content are NOT silently treated as 200). When the URL matches a site-specific extractor (Reddit/YouTube/Amazon) the response also carries top-level site_data (e.g. Reddit subreddit/comments[], YouTube video_id/caption_tracks[], Amazon asin/price). When section is set and no heading matches, metadata.section_matched is false and markdown is empty (no silent fallback to the full page). Repeat fetches are instant. Localhost URLs work. Defer to a browser-automation MCP for click/login flows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to fetch | |
| mode | No | cache=HTTP-only, accepts stale cache. default=standard fetch with JS detection. stealth=full browser render. | |
| actions | No | Sequential browser actions to perform before extracting content. When present, forces browser rendering (bypasses HTTP-first routing). | |
| headers | No | Additional HTTP headers | |
| section | No | Extract a specific section by heading text | |
| use_auth | No | Use stored auth credentials (default: false) | |
| max_chars | No | Maximum characters to return (hard slice) | |
| render_js | No | JavaScript rendering mode (default: auto) | |
| screenshot | No | Capture a screenshot (default: false) | |
| force_refresh | No | Bypass cache and fetch fresh content from the network. Use for rapidly changing pages (news, changelogs, dashboards). | |
| section_index | No | Index of the section match (default: 0) | |
| max_tokens_out | No | Token-budget cap on total output. Uses cl100k-base BPE; non-OpenAI tokenizer counts may drift ~5-15%. When both max_tokens_out and max_chars are set, max_tokens_out wins. | |
| citation_format | No | Citation rendering style. 'numbered' (default) inline [N] markers; 'json' returns a citations[] array; 'anthropic_tags' wraps sources in <source id='...'> tags. | |
| max_content_chars | No | Smart truncate markdown to N chars at paragraph/heading boundary with [... content truncated] marker. Preferred over max_chars for AI agents. | |
| include_full_markdown | No | Include full markdown body in the response. Default false on multi-result tools (returns evidence excerpts only); set true to restore. |