Skip to main content
Glama

Fill PDF form

pdf_form_fill

Fill AcroForm PDF fields by exact name and write a new output file without modifying the source or overwriting existing files.

Instructions

Fill an AcroForm PDF and write a NEW file (the source is never modified and an existing output is never overwritten). values maps exact field names to values: strings for text fields; an on-state such as "/1" or "/Yes" (or true) to check a box, "" or false to clear it. strict=true refuses the whole fill if any name is unknown. finalize=true removes the XFA packet and NeedAppearances flag so viewers render the values from their own appearance streams (fields stay editable; this is not flattening). Returns the output SHA-256 and a read-back of every text value.

Input Schema

NameRequiredDescriptionDefault
strictNo
valuesYes
finalizeNo
output_pathYes
source_pdf_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that the source is untouched, that an existing output will not be overwritten, what strict=true actually refuses, and precisely what finalize=true does (removes XFA packet and NeedAppearances, fields remain editable, not flattening). This resolves the main ambiguity of a mutate-in-place tool — whether it destroys the original or flattens the form — which the annotations alone (destructiveHint=false) would not convey.

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?

Four tightly packed sentences, front-loaded with the action and the safety guarantees, then field-value encoding rules, then the two flags, then return values. Parenthetical asides carry real content rather than boilerplate; nothing is redundant.

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?

Covers the write-target safety model, the tricky free-form values encoding, both boolean flags, and the return payload (SHA-256 plus read-back of text values), so an agent knows both how to call it and what it can trust from the result. Nothing material is missing for a tool of this complexity.

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

Parameters5/5

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

With 0% schema description coverage and a free-form `values` object (additionalProperties: true) plus nested checkbox semantics, the description carries the entire burden and does so: exact-field-name mapping, string vs on-state ('/1', '/Yes', true) vs clearing ('', false), strict behavior, and finalize behavior. This is information an agent cannot derive from the schema.

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

Purpose4/5

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

Opens with a specific verb and resource: 'Fill an AcroForm PDF and write a NEW file.' It is clearly a distinct operation from pdf_form_inspect (reading form structure) and pdf_form_verify, but it never explicitly names or contrasts with those siblings, so differentiation is left to inference.

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

Usage Guidelines3/5

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

The parenthetical 'the source is never modified and an existing output is never overwritten' implies when this is safe to call and gives an implicit constraint (pick a fresh output path), but there is no explicit guidance on when to use this versus pdf_form_inspect or pdf_form_verify, nor stated prerequisites (e.g., inspecting first to get exact field names).

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