Skip to main content
Glama

Fill PDF form fields

fill_pdf
Read-onlyIdempotent

Fill the fillable (AcroForm) fields of a PDF and return the finished PDF. values maps field name -> text (text/dropdown/radio) or true/false (checkbox). flatten (default true) bakes the answers into the page so they cannot be edited.

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": {
      "values": "<values>"
    },
    "name": "fill_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYesField name -> value. Use names from inspect_pdf.
file_idNoA file id from POST /api/v1/files or an earlier result. Use this, template_id or pdf_base64.
flattenNoBake the answers into the page (default true).
file_nameNoName for the returned file (default filled.pdf).
pdf_base64NoThe PDF, base64 encoded (max 15 MB). Prefer file_id for big files.
template_idNoA template id from list_templates.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds real value beyond that: it explains that flatten bakes answers in irreversibly and that a new PDF is returned rather than the source being modified.

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 short sentences, front-loaded with the action and result, then the values contract, then the flatten default. No filler or repetition of the title.

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 six parameters, full schema coverage and no output schema, the description covers the essentials: what it consumes, how values are typed, and what flatten does to the output. It does not address failure modes such as non-fillable PDFs or invalid field names, which is a minor gap rather than a blocking one.

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

Parameters3/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. The description does add the useful type mapping for values (text for text/dropdown/radio, true/false for checkbox) and the consequence of flatten, but file_id vs template_id vs pdf_base64 selection is left entirely to 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?

States a specific verb and resource ("Fill the fillable (AcroForm) fields of a PDF") plus the outcome ("return the finished PDF"). The AcroForm qualifier distinguishes it from a general annotation tool like annotate_pdf, though no sibling is named explicitly.

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?

Usage is implied: this is the tool for populating existing form fields, and the schema points to inspect_pdf for field names. There is no explicit when-to-use versus annotate_pdf or plan_profile_fill, and no statement of what happens with a PDF that has no fillable fields.

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.

Resources