fetch_html_to_markdown
Fetch a web page, strip scripts and navigation, and convert HTML to clean markdown for compact LLM input. Blocks private hosts and follows redirects.
Instructions
GET a URL, decode the HTML, and convert to clean markdown (headings, lists, links, code fences). Scripts, styles, iframes, nav, footer, and aside elements are stripped. Intended for feeding web pages into an LLM cheaply -- markdown is usually 3-8x smaller than raw HTML. Follows redirects, respects size/timeout limits, and blocks private-host requests by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to fetch | |
| max_bytes | No | Max response size in bytes (default 5MiB) | |
| timeout_ms | No | Request timeout in ms (default 10000) | |
| user_agent | No | User-Agent override | |
| max_redirects | No | Max redirect hops (default 5) | |
| allow_private_hosts | No | Allow loopback / private / link-local addresses (default false) |