Skip to main content
Glama

PDFops

Inspect PDF form fields

pdf_inspect
Read-onlyIdempotent

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 but never modified. Call this FIRST when filling an unfamiliar PDF, since pdf_fill rejects unknown field names and over-length values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_pathYesPDF source: an https:// URL or a data:application/pdf;base64,… URI (this hosted server cannot read local file paths).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of form fields found; 0 when the PDF has no fillable form
fieldsYesOne entry per form field, in document order
hasXFAYesTrue for hybrid AcroForm/XFA documents, whose XFA layer is dropped when filled
truncatedYesTrue when the form exceeded an API enumeration cap; fields is then a prefix, not the full list
fillTemplateYesField name to empty-or-current value, ready to edit and pass to pdf_fill

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), but the description adds real behavioral context beyond them: XFA data loss on hybrid inputs when filled, and the fill-time rejection semantics of unknown/over-length fields. The 'read-only, never modified' sentence partially duplicates readOnlyHint, which keeps this from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three front-loaded sentences with no filler: what is returned, the XFA/empty-form caveats, then the read-only guarantee and the call-first guidance. Every clause carries actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still usefully summarizes the return shape, and it covers the one input constraint, the ordering prerequisite relative to pdf_fill, and the data-loss caveat. Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter (pdf_path) and schema description coverage is 100%, so the schema already specifies the accepted URL/data-URI forms and the no-local-paths limitation. The description adds no parameter-level detail, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb + resource (list AcroForm form fields) and enumerates exactly what is returned: names, types, options, current values, maxLength, plus a fillTemplate object and hasXFA flag. It also implicitly distinguishes itself from pdf_fill by being the read-side counterpart.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to call this FIRST when filling an unfamiliar PDF and names the reason (pdf_fill rejects unknown field names and over-length values), which routes the agent to the correct sibling and ordering. It also states the empty-form case ('returns count 0') so the agent knows how to interpret a null result.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources