html_to_markdown
Idempotent
Convert HTML content to Markdown format. Transform web pages and emails into Markdown with preserved structure for headings, tables, lists, code blocks, links, and images.
Instructions
Convert HTML to Markdown. Performs round-trip import of HTML content back to Markdown format. Handles headings, tables, lists, code blocks, links, images, and inline formatting. Useful for importing web content or converting HTML emails to Markdown.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | The HTML content to convert to Markdown. Can be a full HTML document or a fragment. | |
| output_path | No | Optional. Absolute or relative file path (e.g. './output.txt') where the result will be saved. Parent directories are created automatically. If omitted, the converted text content is returned directly in the response as a string. If provided, the file is written to disk and a JSON summary with { success, file_path, file_size_bytes, format } is returned instead. |