Web HTML to Clean LLM-Optimized Markdown Engine
extract_clean_markdownConverts raw HTML pages or live web URLs into clean, boilerplate-free, LLM-optimized Markdown with preserved hyperlinks and headings. Accepts either 'url' to fetch directly or raw 'html_content' from upstream scrape_readable_article; for isolating tabular data into structured datasets, use parse_html_tables instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'url' or 'html_content' ('conversion_mode' defaults to 'clean_semantic_article'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "extract_clean_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Optional web page URL to fetch and parse directly, bypassing an out-of-band fetch step. | |
| html_content | No | Raw HTML string of the web page or document to convert to clean Markdown. | |
| preserve_links | No | Whether to retain anchor hyperlinks and image markdown references in output. | |
| conversion_mode | No | Markdown extraction strategy: clean semantic article, preserve tables/code, or minimal text. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Document title extracted from H1 or title tag. | |
| markdown | Yes | Clean, sanitized LLM-ready markdown document. | |
| word_count | Yes | Net word count of extracted readable prose. | |
| links_extracted_count | Yes | Total hyperlinks preserved in document. |