convert_document_to_markdown
Convert almost any document to clean Markdown from a URL or base64, with automatic format detection and OCR for scanned PDFs and images.
Instructions
Convert almost any document to Markdown in one call: DOCX, PPTX, XLSX, EPUB, HTML, CSV/JSON/XML/TXT and PDF are auto-detected from the URL or base64 content. This is the universal 'just give me the text' tool — use it when the file format is unknown or mixed.
Images and scanned PDFs are routed to OCR automatically when the server
has OCR installed. Legacy .doc/.xls/.ppt binaries are not supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http(s) URL of the document to fetch and convert. Leave empty when passing file_base64 instead. | |
| pages | No | 1-based page selection like '1,3-5'. Empty means all pages. | |
| offset | No | Character offset to resume a truncated conversion. | |
| filename | No | Original filename with extension (e.g. 'report.docx'). Used as a format hint when content type cannot be detected automatically. | |
| password | No | Password for encrypted PDFs. Empty for normal files. | |
| max_chars | No | Maximum characters to return (default 40000, max 200000). | |
| file_base64 | No | Base64-encoded file content (for documents not reachable by URL). Decoded size limit: 30 MB. Leave empty when passing url instead. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |