fetch_markdown
Fetches any HTTP/S URL and returns the main article content as clean Markdown. Works best for articles, documentation, and blog posts; supports raw output for non-HTML responses.
Instructions
Fetch a public HTTP/S URL and return its main article content as clean markdown. Best for articles, documentation, blog posts, and reference pages. Non-HTML responses return unsupported_content_type unless raw is set; pure client-rendered SPAs return extraction_failed. Set savePath to write the output to a file instead of returning it inline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Return the response body verbatim as UTF-8 text (binary is not byte-preserved), skipping Readability and the HTML content-type gate — for JSON, APIs, or raw page source. `MARKFETCH_MAX_BYTES` still applies. | |
| url | Yes | Absolute http(s) URL of the page to fetch. The server follows redirects automatically. No authentication headers, cookies, or session state are sent. | |
| savePath | No | Absolute path to write the output to instead of returning it inline; the response becomes a short confirmation. Use when the output might exceed your client's tool-result cap. Relative and `~` paths are rejected. Writes are sandboxed to allowed roots (defaults: system temp dir and the server's working directory; override with `MARKFETCH_ALLOWED_WRITE_ROOTS`) — paths outside return `save_forbidden`. Existing files are overwritten; the parent directory must exist. Fetch errors never touch the file. |