Skip to main content
Glama

JustFill PDF Form Automation

Fill the PDF

fill_pdf
Destructive

Fill the PDF and return a download link (valid until the workspace expires).

`values` maps field id -> text (checkboxes: "yes"/"x"/"true" to tick).
`flatten=False` preserves existing form fields; it does not create fields
on scans. `fillable=True` creates interactive fields (subject to the
account's existing export entitlement) and takes precedence over flatten.
`editable`, `editable_widget_count` and `output_type` describe the actual PDF.
`editable` means at least one form widget is writable, not that all values are.
`warnings` lists text printed too small or cut off (with flatten=True
render_filled_preview reports them beforehand; with flatten=False editable
widgets are not measured). `output_mode` "watermarked" means the result
contains a JustFill watermark. A clean final output may consume one of the
account's existing fill entitlements; when none is available, the result
is watermarked.

Visual review gate & workflow routing:
- For ML-detected layouts (`source="ml"`), `fill_pdf` requires prior
  `render_preview` and `render_filled_preview` calls (with matching `values`,
  `flatten`, and `fillable` flags) on every populated page; otherwise it
  returns `required_calls` without generating the PDF.
- Use `render_filled_preview` first to verify placement and text fit at no
  cost; call `fill_pdf` only when ready to generate the downloadable PDF.
- Do not call `close_workspace` until the user has downloaded the file from
  `download_url`.

Input Schema

NameRequiredDescriptionDefault
valuesYesNon-empty mapping of `field_id` (from `open_pdf` or `list_fields`) to the string value to fill. Checkboxes tick on `'yes'`, `'x'`, or `'true'`. Must not contain restricted data (payment cards, PHI, government IDs, or authentication secrets).
flattenNoIf `True` (default), flattens filled values into static page content. If `False`, preserves existing embedded AcroForm widgets as editable fields.
fillableNoIf `True`, synthesizes interactive, editable AcroForm widgets for the fields in the output PDF (subject to account entitlement; takes precedence over `flatten`).
workspace_idYesActive workspace ID returned by `open_pdf` (`summary.workspace_id`).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / fillable / description
      Added value: +"If `True`, synthesizes interactive, editable AcroForm widgets for the fields in the output PDF (subject to account entitlement; takes precedence over `flatten`)."
    • addedInput schema / properties / flatten / description
      Added value: +"If `True` (default), flattens filled values into static page content. If `False`, preserves existing embedded AcroForm widgets as editable fields."
    • addedInput schema / properties / values / description
      Added value: +"Non-empty mapping of `field_id` (from `open_pdf` or `list_fields`) to the string value to fill. Checkboxes tick on `'yes'`, `'x'`, or `'true'`. Must not contain restricted data (payment cards, PHI, government IDs, or authentication secrets)."
    • addedInput schema / properties / workspace_id / description
      Added value: +"Active workspace ID returned by `open_pdf` (`summary.workspace_id`)."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare this is destructive, non-read-only, and non-idempotent; the description adds substantial behavioral context beyond that. It discloses download-link expiry, flatten/fillable precedence and entitlement effects, watermarking semantics, warning behavior, editable-widget meaning, and the ML-layout visual review gate.

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?

The description is front-loaded with the core action and then structured into parameter behavior and workflow-routing sections. It is dense and somewhat repetitive of schema content, but the length is largely justified by the tool's complexity.

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?

Given an output schema exists, the description need not explain return values, and it covers the critical workflow constraints, entitlement effects, preview prerequisites, and download lifecycle. An agent has enough context to invoke the tool correctly without needing external assumptions.

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 schema already documents the parameters thoroughly, and the description adds only marginal semantics such as flatten=False not creating fields on scans and fillable precedence. The checkbox value syntax is repeated from the schema rather than adding new parameter meaning.

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?

The description states a specific verb and resource: fill the PDF and return a download link. It also distinguishes the final generation step from preview and workspace-closing siblings by explicitly naming render_filled_preview and close_workspace.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit workflow routing: use render_filled_preview first, call fill_pdf only when ready, and for ML-detected layouts require prior render_preview and render_filled_preview calls. It also names a when-not condition via the required_calls behavior and warns not to close the workspace before download.

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.