Inspect PDF form fields
pdf_inspectList a PDF's AcroForm fields—names, types, options, values, maxLength—and produce a paste-ready fillTemplate with an XFA flag. Inspect first before filling to avoid unknown-field or over-length errors.
Instructions
List a PDF's AcroForm form fields — names, types, options, current values, per-field maxLength where declared — plus a paste-ready fillTemplate object for 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. Call this FIRST when filling an unfamiliar PDF, since pdf_fill rejects unknown field names and over-length values.
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 |
|---|---|---|---|
| pdf_path | Yes | PDF source: an absolute file path, an https:// URL, or a data:application/pdf;base64,… URI. Use a URL or data URI 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 | |
| fillTemplate | Yes | Field name to empty-or-current value, ready to edit and pass to pdf_fill |