Skip to main content
Glama

Fill a PDF form

pdf_form_fill
Read-onlyIdempotent

Fill PDF form fields by name with text, checkboxes, radio groups, dropdowns, and lists; optionally flatten answers into the page.

Instructions

Fill PDF form fields by name (get names from pdf_form_fields): text as strings, checkboxes as true/false, radio groups and dropdowns by option text, lists as arrays. Optionally flatten (bake the answers into the page, no longer editable). Only changed fields are redrawn. Text the standard font cannot draw (Arabic…) is kept and viewers are asked to draw it, but cannot be flattened. Web version: https://s3eidat.github.io/pdf-fill/

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF: a local file path (absolute, or relative to the server's --root) or base64 data (raw or a data: URI).
outputNoWhere to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set).
valuesYesField name -> value, e.g. {"name": "Sara", "agree": true, "plan": "pro", "langs": ["Arabic"]}.
flattenNoFlatten the form after filling (fields become plain page content).
returnBase64NoAlso return the output as base64 in the result (only for small files). Default false.
ignoreUnknownNoSkip names that are not in the form instead of failing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnly/idempotent/openWorld; the description adds real behavior: flattening is irreversible ("bake the answers into the page, no longer editable"), only changed fields are redrawn, and text the standard font cannot draw is preserved but cannot be flattened. Minor tension worth noting: it writes to an output path while readOnlyHint=true, though the input PDF itself is not mutated.

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?

One dense paragraph, front-loaded with the operation and the routing hint, then type conventions, then behavioral caveats, then the URL. No filler sentences; every clause carries information.

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?

With 6 parameters, no output schema, and thin annotations, it covers the essential concerns: input naming source, value typing, flatten irreversibility, Unicode fallback limits, and the base64 return option. It never states what the tool returns on success (path? summary?), which is the main remaining gap.

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 baseline is 3; the description earns an extra point by explaining the consequence of `flatten` beyond the schema's terse "fields become plain page content" (irreversible loss of editability) and by restating the value-type mapping that the `values` anyOf only encodes structurally.

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 concrete verb and resource ("Fill PDF form fields") and immediately scopes it by saying field names come from pdf_form_fields, which cleanly distinguishes it from that sibling. An agent can identify the operation and its prerequisite without opening any schema.

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?

Explicitly routes the agent to pdf_form_fields to obtain field names first, and gives per-type value conventions (strings for text, true/false for checkboxes, option text for radios/dropdowns, arrays for lists). No explicit "when not to use" clause, e.g. pointing to pdf_sign_image for signatures, which keeps it from a 5.

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

Deploy Server

Other Tools