Skip to main content
Glama

Fill a PDF form

pdf_form_fill

Fill the fields of a fillable PDF form and return the completed form. Input: the PDF's contents as a base64-encoded string, plus a fields object mapping field names to values. Unknown field names are rejected with a list of the form's real fields. Checkboxes accept true/false; radio groups take the chosen option's name; dropdowns take one of their defined choices. Set flatten=true to bake values in so they can no longer be edited. Returns a download_url for the filled PDF (link valid 24 hours). Costs 1 credit; 5 free calls per month.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pdf_base64": "<pdf_base64>",
      "fields": "<fields>"
    },
    "name": "pdf_form_fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsYesObject mapping the form's field names to the values to fill in, e.g. {"full_name": "Jane Doe", "agree": "true"}. Unknown names are rejected with the form's real field list.
flattenNoIf true, bake the filled values into the page so the form can no longer be edited (default false).
pdf_base64YesThe fillable PDF form's contents as a base64-encoded string (max 25 MB / 500 pages).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / fields / description
      Added value: +"Object mapping the form's field names to the values to fill in, e.g. {\"full_name\": \"Jane Doe\", \"agree\": \"true\"}. Unknown names are rejected with the form's real field list."
    • addedInput schema / properties / flatten / description
      Added value: +"If true, bake the filled values into the page so the form can no longer be edited (default false)."
    • addedInput schema / properties / pdf_base64 / description
      Added value: +"The fillable PDF form's contents as a base64-encoded string (max 25 MB / 500 pages)."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the write profile (readOnlyHint=false, destructiveHint=false, non-idempotent). The description adds real behavioral context beyond that: unknown field names are rejected with the form's actual field list, flatten permanently bakes values in, the download_url expires after 24 hours, and each call costs 1 credit with 5 free calls monthly. That is exactly the kind of operational detail an agent needs before spending a credit.

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?

Front-loaded with purpose, then input format, then edge-case semantics, then cost and return value — a logical progression with no filler sentences. Minor redundancy exists where flatten and the base64 input are described in both the description and the schema.

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 3-parameter mutation tool with a nested fields object, the description covers input format, error behavior on bad field names, per-type value conventions, the flatten trade-off, output link and its expiry, and the credit cost. An output schema exists, yet the description still surfaces the practically important return detail (24-hour link) and nothing needed to call it correctly is missing.

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, but the description adds genuine meaning the schema lacks: how values must be encoded per field type and the consequence of flatten=true (values become uneditable). The flatten behavior is repeated from the schema, which keeps it from a 5.

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 and resource ('Fill the fields of a fillable PDF form') plus the outcome ('return the completed form'). This is unmistakably distinct from sibling utilities like merge_pdfs or images_to_pdf, so an agent can select it without opening the 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?

The 'fillable PDF form' qualifier implicitly scopes when the tool applies, and the per-field-type guidance (checkbox true/false, radio by option name, dropdown by defined choice) tells the agent how to prepare input. It stops short of naming an alternative tool or an explicit when-not condition, so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.