read_pdf
Extracts PDF text page by page with page-range selection and token-limited output, and reports scanned pages lacking a text layer instead of returning empty content.
Instructions
Read the text of a PDF, page by page, each page headed '--- Page N of M ---'.
Output is capped at roughly max_tokens. When it is cut off, the last line says exactly which pages= value to pass to continue. Pages without a text layer (scanned images) are reported as such instead of coming back empty; there is no OCR.
pages: 1-based ranges like '1-3,5,7-' ('7-' = page 7 to the end). Empty = all pages. layout: true keeps the visual column layout (better for forms and statements; wider output). max_tokens: output budget, about 4 characters per token.
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": {
"path": "<path>"
},
"name": "read_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pages | No | ||
| layout | No | ||
| password | No | ||
| max_tokens | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |