Inspect PDF form fields
pdf_inspectLists AcroForm field names, types, options, current values, max lengths, fill-template data, and XFA status from a PDF to help prepare valid form fills without modifying the file.
Instructions
List the form fields (AcroForm) of a PDF: names, types, options, current values and per-field maxLength where declared, plus a fillTemplate object ready to pass to pdf_fill and a hasXFA flag (hybrid AcroForm/XFA inputs lose their XFA layer when filled). A PDF with no fillable form returns count 0. Read-only: the PDF is fetched or read but never modified. pdf_fill rejects unknown field names and over-length values; this tool lists the names and the maxLength values it checks against.
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": {
"pdf_path": "<pdf_path>"
},
"name": "pdf_inspect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| password | No | Password to open the input, only needed for a user-password PDF (owner-locked files with an empty user password open without it). | |
| pdf_path | Yes | PDF source: a path to a .pdf file inside the allowed directories (PDFOPS_ROOT, default the working directory), an https:// URL, or a data:application/pdf;base64,… URI. A URL or data URI works when this server runs remotely (Smithery, hosted gateways), where local paths do not exist. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of form fields found; 0 when the PDF has no fillable form | |
| fields | Yes | One entry per form field, in document order | |
| hasXFA | Yes | True for hybrid AcroForm/XFA documents, whose XFA layer is dropped when filled | |
| truncated | Yes | True when the form exceeded an API enumeration cap; fields is then a prefix, not the full list | |
| fillTemplate | Yes | Field name to empty-or-current value, ready to edit and pass to pdf_fill |