Skip to main content
Glama

pdfops-mcp

Fill PDF form

pdf_fill
Idempotent

Fill AcroForm form fields in a PDF and return the result. Field names must exist in the PDF (use pdf_inspect first). All values are strings; checkboxes take "true"/"false"; dropdown/radio/optionlist values must be one of the field's options; text values must respect the field's maxLength from pdf_inspect. The source PDF is never modified. Returns the filled PDF inline as an application/pdf resource. Encrypted PDFs are rejected with decrypt advice (common for government blanks with an empty user password).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYesField name → string value (from pdf_inspect's fillTemplate)
flattenNoBake values into page content and drop the AcroForm so fields are no longer editable
pdf_pathYesTemplate PDF source: an https:// URL or a data:application/pdf;base64,… URI (this hosted server cannot read local file paths).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesYesSize of the produced PDF in bytes
resource_uriNopdfops:// uri of the inline application/pdf resource

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that the source PDF is never modified, that the filled PDF is returned inline as an application/pdf resource, and that encrypted PDFs are rejected with decrypt advice. This adds concrete behavioral context (idempotent rewrite into a new artifact, encryption failure mode) that readOnlyHint/destructiveHint alone do 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?

Every sentence carries a distinct, decision-relevant rule (purpose, prerequisite, value typing, immutability, return format, encryption failure) with the core action front-loaded in the first clause. No filler or restatement of the name or annotations.

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 prerequisite tool, input value constraints, immutability guarantee, encryption error path, and output delivery method for a tool with nested object params and an output schema. Nothing an agent needs to invoke 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 real semantics the schema lacks: all values are strings, checkboxes take "true"/"false", dropdown/radio/optionlist values must be one of the field's options, and text values must respect maxLength from pdf_inspect. It is not a 5 because 'flatten' is only explained by the schema, not the description.

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 AcroForm form fields in a PDF') plus the return behavior ('return the result'). Names the sibling pdf_inspect as a prerequisite, so an agent can distinguish it from pdf_merge/pdf_invoice 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?

Gives an explicit sequencing instruction ('Field names must exist in the PDF (use pdf_inspect first)'), which tells the agent when to reach for this tool and what must precede it. It stops short of stating when NOT to use it or comparing it against pdf_merge/pdf_invoice, so it is clear context without full alternative routing.

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.