HTML to Markdown: convert raw HTML you already have
page_html_to_markdownConvert raw HTML (that the agent already fetched or generated) into clean Markdown for an LLM: headings, links, lists, bold/italic, code blocks and tables kept; scripts, styles, iframes and SVG removed. mode=article keeps only the main content (Mozilla Readability, drops nav/ads/footer). base_url makes relative links and images absolute. Returns title, markdown, word and link counts. No fetching — to convert a live URL use /v1/page/text. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"html": "<html>"
},
"name": "page_html_to_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | Raw HTML string or fragment (max 2 MB) | |
| mode | No | full (default) or article (main content only) | |
| base_url | No | Optional page URL to resolve relative links, e.g. https://ex.com/a/ |