fetch
Retrieve an http(s) URL and return its content as Markdown, HTML, plaintext, JSON, or raw text, with readable-article extraction and continuation cursors for truncated responses.
Instructions
Fetch an http(s) URL and return its content in one response. Use this to read a web page or a JSON/text URL. Default format is markdown with readable-article extraction. Do not send startCursor. Parameters that matter: url (required on the first call), format (html | markdown | plaintext | json | txt, default markdown). Optional: maxChars (default 100000), maxBytes (default 1048576), timeout (default 30000). If the response is truncated it includes nextCursor and chunkId; call fetch again with that cursor to continue. Private, loopback, and link-local targets are blocked. Browser rendering is off unless useBrowser or autoDetectMode is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute http(s) URL to fetch. Required on the first call. Optional when cursor or chunkId continues a truncated response. | |
| debug | No | Write debug logs to stderr. Default: false. Do not enable unless the user asked for diagnostics. | |
| proxy | No | Optional proxy URL (http://host:port or https://host:port). | |
| cursor | No | Continuation token from a previous truncated response (nextCursor). Omit on the first call. When set, the server returns the next slice and does not refetch the URL. | |
| format | No | Output format. markdown (default) and plaintext extract readable content over HTTP. html returns markup. json expects a JSON document. txt returns the raw body. | |
| chunkId | No | Legacy or document id. Prefer cursor. With a 1.x byte chunk, also pass startCursor. | |
| headers | No | Optional request headers as a string-to-string map. | |
| noDelay | No | Skip the random delay between redirects. Default: false. | |
| timeout | No | Request timeout in milliseconds. Default: 30000. | |
| maxBytes | No | Maximum UTF-8 bytes to return in this response. Default: 1048576. Used together with maxChars; the smaller budget wins. | |
| maxChars | No | Maximum characters to return in this response. Default: 100000. The cut prefers a newline or space. Omit this on a normal fetch. | |
| useBrowser | No | Use the optional headless browser. Default: false. Requires puppeteer to be installed. Leave false for normal HTTP fetches. | |
| saveCookies | No | Keep cookies for the same site across browser-mode calls. Default: true. | |
| startCursor | No | Legacy byte offset used only with chunkId from a 1.x split. Not required. Do not send this for a normal fetch or for a cursor continuation. | |
| closeBrowser | No | Close the browser after this call. Default: false. | |
| maxRedirects | No | Maximum redirects to follow. Default: 10. Each redirect is checked for SSRF. | |
| autoDetectMode | No | Retry with the browser after an HTTP 403 or challenge page. Default: false. Set true only when the HTTP fetch is blocked and puppeteer is installed. | |
| extractContent | No | Extract the main article with Readability before converting. Default: true for markdown and plaintext, false for html, json, and txt. | |
| scrollToBottom | No | Scroll to the bottom before reading the page in browser mode. Default: false. | |
| useSystemProxy | No | Use HTTP_PROXY / HTTPS_PROXY / NO_PROXY when no proxy argument is set. Default: true. | |
| waitForTimeout | No | Extra wait after load in browser mode, in milliseconds. Default: 5000. | |
| includeMetadata | No | Include title, byline, and site name when extractContent is true. Default: true. | |
| waitForSelector | No | CSS selector to wait for in browser mode. | |
| contentSizeLimit | No | Legacy byte chunk size. When set without maxChars/maxBytes, the 1.x byte splitter is used. Prefer maxChars. | |
| fallbackToOriginal | No | If Readability finds no article, convert the original document. Default: true. | |
| enableContentSplitting | No | When false, oversized content is truncated with no continuation cursor. Default: true. |