html_to_markdown
Strip unnecessary elements from web pages or raw HTML to produce clean Markdown. Saves tokens by preserving only headings, lists, links, code blocks, and emphasis.
Instructions
Convert a URL or raw HTML string into clean Markdown. Strips navigation, ads, scripts, and boilerplate; preserves headings, lists, links, code blocks, and emphasis. Use instead of loading raw HTML into context — saves 85–98% of tokens compared to the original page. Accepts either a URL (fetched server-side) or an html parameter with raw HTML.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to fetch and convert (http:// or https://). | |
| html | No | Raw HTML string to convert directly (alternative to url). | |
| maxChars | No | Max characters of Markdown to return (default 12000, max 50000). |