Convert PDF or HTML to Markdown
convert_to_markdownConvert a local text PDF or saved HTML file into clean Markdown for reading, quoting, summarizing, or indexing, with PDF tables preserved as Markdown tables.
Instructions
Turn a local text PDF or saved HTML file into clean Markdown.
Use this when you want to read, quote, summarize or index a document as text, for example before RAG chunking or pasting into a prompt. Tables are kept as Markdown tables. Do not use it for scanned PDFs or photos (there is no OCR), for live web URLs (save the page as .html first), or when you only need the tables as CSV data (use a PDF table extractor instead).
path: full path to a .pdf or .html file on this computer. tables: PDF tables. "lines" (default) finds tables with border lines, "text" also tries tables lined up by spaces, "off" gives plain text. output_path: optional. If set, the Markdown is saved there and that path is returned. An existing file at that path is replaced. If empty, nothing is written and the Markdown text is returned.
Tables come back as Markdown tables. Scanned (image-only) PDF pages have no text and are skipped.
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": {
"path": "<path>"
},
"name": "convert_to_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| tables | No | lines | |
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |