Read PDF
read_pdfRead a PDF and return its text as markdown (or plain text). Accepts a public URL or base64 bytes. Extracts the embedded text layer; a scanned, image-only PDF returns a needs-OCR notice instead of empty text. Priced per document; retries with the same idempotencyKey never double-read. The canonical way for an AI agent to ingest a document's contents.
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": {
"source": "<source>"
},
"name": "read_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | The PDF to read. Provide exactly one of: url or base64. | |
| options | No | Optional read settings. | |
| idempotencyKey | No | A stable key. Repeat calls with the same key return the stored result instead of re-reading or re-billing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Extracted text in the requested format. | |
| needsOcr | No | True when the PDF is scanned (no text layer) and needs OCR. | |
| pageCount | No | Number of pages read. |