Skip to main content
Glama

pdf_fill

Fill AcroForm fields in a PDF and save the result. Provide field names and values to populate text, checkbox, and dropdown fields, with advice for encrypted PDFs.

Instructions

Fill AcroForm form fields in a PDF and save the result. Field names must exist in the PDF (use pdf_inspect first). All values are strings; checkboxes take "true"/"false"; dropdown/radio/optionlist values must be one of the field's options; text values must respect the field's maxLength from pdf_inspect. Encrypted PDFs are rejected with decrypt advice (common for government blanks with an empty user password).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYesField name → string value (from pdf_inspect's fillTemplate)
flattenNoBake values into page content and drop the AcroForm so fields are no longer editable
pdf_pathYesAbsolute path to the template PDF
output_pathYesAbsolute path to write the filled PDF
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and delivers: it discloses validation behavior (field names must exist), value semantics per field type (checkbox 'true'/'false', option-list membership for dropdown/radio, maxLength for text), and a specific failure mode with remediation advice (encrypted PDFs rejected). It does not explicitly state that the source PDF is left unmodified, a minor omission given output_path implies a separate write.

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 sentences with no filler: purpose front-loaded in sentence one, input constraints in sentence two, failure mode in sentence three. Each clause carries operational weight and nothing is repeated from the schema.

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

Completeness4/5

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

The tool is moderately complex — nested fields object, conditional value semantics, a failure mode — and has neither annotations nor an output schema, yet the description covers purpose, prerequisites, parameter semantics, and error behavior. The only gap is the return value, which is not described anywhere since no output schema exists.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, and the description adds genuine value on top: it specifies the value formats for the fields object ('true'/'false' for checkboxes, option-list membership for dropdown/radio, maxLength for text), which the schema only vaguely describes as 'Field name → string value'. This materially improves an agent's ability to construct valid input.

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 opens with a specific verb and resource — 'Fill AcroForm form fields in a PDF and save the result' — which unambiguously distinguishes it from siblings pdf_merge, pdf_inspect, pdf_invoice, and pdfops_usage. The write-to-output behavior is also stated upfront, leaving no ambiguity about what the tool accomplishes.

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

Usage Guidelines4/5

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

It explicitly names the prerequisite workflow — 'use pdf_inspect first' — and warns when the tool will refuse input (encrypted PDFs, with decrypt advice). It does not enumerate when-not-to-use scenarios relative to the other siblings (e.g., merge or invoice), so it stops just short of full exclusion guidance.

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