PDF information
get_pdf_infoInspect an unknown PDF to get page count, sizes, metadata, encryption status, and pages lacking a text layer, so you can decide whether to extract, OCR, or search.
Instructions
Reads a PDF's overview and returns it as text: page count, page sizes in mm, title, author, subject, keywords, creating program, dates, whether it is encrypted, and which pages have no text layer (scans that need recognize_text). Call it first on an unknown file to decide what to do next; for the text itself use extract_text, to find a word use search_pdf. Read-only. An encrypted PDF needs its password; a missing or damaged file is reported as an error.
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": "get_pdf_info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the PDF. | |
| password | No | Password, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it. |