PDF to Markdown
pdf_to_markdownConvert PDFs or selected pages into structured Markdown with headings, lists, tables, and image links, while removing headers, footers, and column order issues for reliable page-cited LLM use.
Instructions
Convert a PDF, or some of its pages, into structured Markdown: headings, paragraphs, lists, tables and image links, with running headers and footers removed and columns in reading order. <!-- page: N --> comments mark where each page starts, so you can cite pages. Images are written to a temporary directory and linked by absolute path (open the file to see a figure); images=false skips them. Output longer than 200000 characters is cut: for long PDFs call pdf_toc first and read the relevant pages. Scanned pages have no text (no OCR); they come back as page images.
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": "pdf_to_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of the PDF file: absolute, or relative to the server's working directory. | |
| pages | No | Pages to convert, 1-based: "3", "2-4", "1,5-7". Default: all. | |
| images | No | Write the images and link them (default true). false: text only. | |
| password | No | Password of an encrypted PDF. Only when an error asks for it. |