Extract plain text
extract_textExtract raw, unformatted text from a PDF as a single string, with page count. Specify a page number to extract only that page.
Instructions
Extract the raw, unformatted text of a PDF as a single string.
Returns JSON {text, page_count} (plus page when a specific page was
requested). Read-only.
Use this when you want the plain reading text. If you need Markdown structure or chunking for LLM/RAG pipelines use convert_pdf; if you need each text run with its on-page coordinates and font use extract_entities.
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": "extract_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 0-based page index to extract. Omit to extract every page joined by newlines. Out-of-range indices return an error. | |
| path | Yes | Path to the PDF file, relative to the configured workspace. | |
| password | No | User password to unlock an encrypted PDF before extraction. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |