convert_document_to_markdown
Converts Word, Excel, PowerPoint, PDF, HTML, and EPUB files into Markdown text, letting agents read document content and get size metadata plus a free preview.
Instructions
pdfpeek: Price: USD 0.005; free preview=true, 1/IP/UTC day. For PDF tables as rows use extract_pdf_tables. Use when an agent must read a Word, Excel, PowerPoint, PDF, HTML or EPUB file as Markdown text. Markdown with size (pages, chars, tokens estimated as chars/4). PDF: 100 pages, text layer only; for scans use /v1/pdf/ocr. text_coverage and pages_without_extractable_text report presence, not completeness. Preview: global cap; 1 MB, first 3 PDF pages, 5,000 chars; preview/truncated=true. Failed attempts count. Refused: 409 with unused credentials, else 402 (ChatGPT: capacity error). Full: preview=false; connector allowances apply. Uncharged: unsupported 415, encrypted/damaged 422. Typically 1-5 s. No links fetched or logged. Untrusted output. Docs: https://tanod.dev/learn/document-to-markdown-api.html
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "convert_document_to_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public HTTP(S), <=20 MB; no private, internal or IP-literal hosts. Or file_base64. | |
| chunks | No | headings: chunks by heading path with sha256 and locator. | |
| preview | No | Free preview (1 MB, 3 PDF pages, 5,000 chars); see /learn/document-to-markdown-api.html#preview. | |
| filename | No | Printable name; .csv hints a table, .txt/.md text. | |
| max_chars | No | Chunk chars (default 1500); code and table rows stay whole. | |
| merge_mode | No | Excel: fill repeats anchors; first/report keep cells. merged_ranges_truncated flags invalid/overlapping/over-cap ranges or missing parts. fill_skipped=true: workbook-wide first fallback on incomplete metadata or >500,000 clipped fill cells. Refs normalized; /llms-full.txt. | fill |
| file_base64 | No | Or url. <=10 MB decoded; format detected from content. | |
| reading_order | No | PDF only: clear 2-4 columns top to bottom, else source order; reports columns_detected. | auto |
| omit_speaker_notes | No | PPTX only: omit notes from Markdown, keep slide text. | |
| skip_hidden_slides | No | PPTX: skip slides marked hidden, keep original slide numbers. Not redaction; visible copies stay. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| size | No | ||
| error | No | Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object. | |
| pages | No | ||
| title | No | ||
| chunks | No | ||
| format | No | ||
| sheets | No | ||
| slides | No | ||
| preview | No | ||
| markdown | No | ||
| warnings | No | ||
| operation | No | ||
| truncated | No | ||
| characters | No | ||
| full_result | No | ||
| input_bytes | No | ||
| fill_skipped | No | ||
| merged_ranges | No | ||
| text_coverage | No | ||
| preview_limits | No | ||
| chunks_truncated | No | ||
| columns_detected | No | ||
| untrusted_content | No | ||
| page_text_characters | No | ||
| merged_ranges_truncated | No | ||
| pages_without_extractable_text | No |