Read text from a scan
ocr_pdfReads the text in a scanned PDF or a picture with text recognition. Returns the text and a link to a .txt file. Up to 30 pages per call; use pages to choose. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs.
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": {
"file": "<file>"
},
"name": "ocr_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | One file: file_id, url or base64. Always pass the person's own file exactly as they gave it. If you cannot pass it, call get_upload_link or ask for an https link to it. Never create, rewrite, summarise or rebuild a document to stand in for theirs. | |
| pages | No | Pages like 1-3,5. | |
| language | No | A language code such as eng, ben or hin; left out, it is detected. |