Skip to main content
Glama

pdf_inspect

List all AcroForm fields in a PDF—names, types, options, values, maxLength—and generate a ready-to-use fillTemplate object for pdf_fill. Flags XFA presence to avoid losing XFA data when filling.

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 form returns count 0. Call this FIRST when filling an unfamiliar PDF: you cannot fill fields whose names you do not know, and values longer than a field's maxLength are rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_pathYesAbsolute path to the PDF to inspect
Behavior5/5

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

With no annotations, the description carries full behavioral burden. It discloses the no-form result ('count 0'), the hybrid XFA/AcroForm consequence, the fillTemplate generation, and the rejection behavior for over-maxLength values — none of which is visible in the schema or annotations. This is above and beyond what an annotations block would provide.

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

Conciseness4/5

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

The description is dense but organized: the core output list, the important XFA caveat, the no-form behavior, and the usage directive. A little redundancy appears ('you cannot fill fields whose names you do not know' restates the need for the field list), but each clause contributes useful operational context.

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?

For a one-parameter tool with no output schema, the description covers the returned data, the edge case of a formless PDF, and the critical consequence for pdf_fill. It gives an agent everything needed to decide when to call this tool and what to expect from it.

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?

Schema coverage is 100% and the only parameter, pdf_path, already has a clear description ('Absolute path to the PDF to inspect'). The tool description adds no extra parameter-level meaning beyond reinforcing that the path targets the PDF to inspect, so the baseline 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?

The description uses a specific verb and resource: 'List a PDF's AcroForm form fields' and enumerates the exact outputs (names, types, options, current values, maxLength, fillTemplate, hasXFA). It clearly distinguishes this as the inspection sibling that feeds pdf_fill, rather than merging, invoicing, or usage meta-tools.

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 states when to use it: 'Call this FIRST when filling an unfamiliar PDF' and gives the rationale: field names must be known and over-maxLength values are rejected. This makes the sequencing against pdf_fill unambiguous, while the sibling list reinforces that it is the pre-fill step.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdfops/pdfops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server