Extract PDF to Markdown
pdf_extractExtract local PDFs into Markdown, preserving headings, lists, and tables. For long documents, specify pages to avoid truncation; check warnings for unreliable text.
Instructions
Extract a local PDF to Markdown, preserving headings, lists and tables. Output is TRUNCATED by default to protect your context window — to read a long document, call repeatedly with the pages parameter rather than raising maxChars. Call pdf_classify first on unfamiliar documents. If the response carries a critical warning (encoding issues, no text layer, right-to-left script), the text is unreliable and must not be quoted as fact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path, or path relative to an allowed root, of a .pdf file | |
| pages | No | 1-indexed page numbers to extract. Omit for the whole document. Prefer this over raising maxChars. | |
| compact | No | Collapse dot leaders and source padding for token efficiency. Defaults to true. | |
| maxChars | No | Truncation ceiling. Defaults to the server setting (40000). |