Document to markdown
document_to_markdownPDF to text: convert a document at a URL to Markdown for an LLM, keeping headings and tables: PDF, Word (DOCX), Excel (XLSX, XLS), OpenDocument (ODT, ODS), CSV and XML, up to 20 MB. For reports, filings, papers, invoices and spreadsheets. Returns the Markdown with character, word and token counts. Costs $0.005 USDC on Base via x402.
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": {
"url": "<url>"
},
"name": "document_to_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public URL of the document |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | string, e.g. "https://www.irs.gov/pub/irs-pdf/fw9.pdf" | |
| type | No | string, e.g. "pdf" | |
| bytes | No | number, e.g. 140815 | |
| words | No | number, e.g. 167 | |
| markdown | No | string, e.g. "# document.pdf\n## Metadata\n- PDFFormatVersion=1.7\n- Lang | |
| truncated | No | boolean, e.g. false | |
| characters | No | number, e.g. 1138 | |
| tokensEstimate | No | number, e.g. 285 |