Document to text: Word, Excel, PowerPoint, PDF
document_textConvert a document to text or Markdown: Word (.docx), Excel (.xlsx), PowerPoint (.pptx), PDF, plain UTF-8 text (.txt/.md/.csv/.json), and scans or images (PNG, JPEG, WebP) by OCR. Give a public URL or POST the file (10 MB default; 10-20 MB URLs retry once at 20 MB; images 3 MB). Old formats and protected files fail uncharged. Use for attachments, scans and spreadsheets in an agent, RAG or workflow. Example: url=https://calibre-ebook.com/downloads/demos/demo.docx. Price $0.005/call via x402 USDC or a card key (/credits); failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.
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_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute public http(s) URL of the file (or send the file in a POST body instead) | |
| format | No | markdown (default: headings, lists and tables kept) or text | |
| maxBytes | No | Maximum file size in MB for a URL read (10 default, up to 20). If omitted, a file over 10 MB is retried once at 20 MB; an explicit value is respected | |
| maxChars | No | Maximum characters of text returned (1000-200000, default 50000) |