Skip to main content
Glama

Fill a PDF form

pdf_fill_form
Idempotent

Fill PDF form fields by name with text, checkbox, or choice values; optionally flatten output so entries become non-editable.

Instructions

Fill form fields by name (pdf_info lists them): text fields take text, check boxes true or false, choices one of their options. With flatten, the filled values become part of the page and can no longer be edited.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesPath to a PDF inside an allowed folder (absolute, or relative to the first allowed folder).
outputYesPath for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files.
valuesYesField name → value, such as {"Name": "Ada Lovelace", "Agree": true}.
flattenNoMake the filled values part of the page (no longer editable).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesYes
pagesYes
outputYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so safety is covered. The description adds real value beyond that by explaining the flatten side effect (values become part of the page and are no longer editable) and per-field-type value semantics. It doesn't cover auth or failure behavior, but the annotations make that omission tolerable.

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?

Two dense sentences, front-loaded with the core action and immediately followed by the value-typing rule and the flatten consequence. No filler or restatement of the name/title.

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, so return values need not be described. With annotations carrying the safety profile and the schema documenting paths and overwrite behavior, the description supplies exactly the missing operational semantics (field naming source, value typing, flatten effect).

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 coverage is 100%, so the baseline is 3. The description exceeds it by mapping value types to field kinds (text → text, check boxes → true/false, choices → one of their options), which the schema's generic string|number|boolean union does not convey.

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 (fill) and resource (form fields by name), which clearly distinguishes it from the many other pdf_* siblings that read, merge, split, or annotate. An agent can tell at a glance this mutates form field values rather than page content.

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?

Routes the agent to the correct discovery path with 'pdf_info lists them', which is a concrete prerequisite for finding valid field names. It stops short of naming explicit alternatives or when-not-to-use cases, so it's clear context rather than full routing guidance.

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