Skip to main content
Glama
formfeed

formfeed

Official

Fill a PDF form

fill_pdf_form

Fills PDF form fields by their full names and returns a downloadable render with filled, skipped, and calculation field details. Keep the form fillable or flatten values into the pages.

Instructions

Fills the fields of a PDF form by their full names, as get_pdf_info lists them, and returns the render with download_url and form: how many fields were filled, which were left out, and which hold a calculation or display format that no viewer ran. The form stays fillable, or flatten draws the values into the pages. A name the form lacks or a value its field does not take fails the call with form_field_unknown or form_value_invalid, naming the field, unless strict is false. Pass exactly one PDF: source, a render or library file of the workspace; path, a file on this machine; or file_base64. Starter plan and above; 0.5 units on a live key. The values are never stored; a signed form and an XFA form are refused.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fill_pdf_form"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute path of a PDF on this machine, up to 100 MB; sent with the request and not kept
fieldsNoValues by the fields' full names: text for a text field, true or false for a check box, one of the field's options for a dropdown, a radio group or a check box with several on-values, a list of options for a list box
sourceNoA PDF of the workspace: the rnd_ id of a PDF render, or a PDF of the file library by name (such as terms.pdf) or fil_ id
strictNotrue (the default) fails on a name the form lacks or a value its field does not take; false leaves both out and lists them in form.skipped
flattenNoDraw the values into the pages and remove the fields, so the values can no longer be changed
filenameNoName of the file behind download_url; the source's name when left out
file_nameNoName of the PDF given as file_base64 or path, e.g. contract.pdf; the results are named after it
file_base64NoThe PDF itself, base64 encoded, up to 20 MB; sent with the request and not kept

Output Schema

NameRequiredDescriptionDefault
idYesrnd_ id of the render
formNoWhat fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran
pdfaNoThe PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it
errorYesWhy a failed render failed
unitsYesUnits the render counted
outputNoThe format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image
statusYes
einvoiceNoThe e-invoice report, when the render made one
templateYesThe template and version rendered; null for html and conversions
expires_atYesWhen download_url stops working; get_render issues a fresh one
page_countYes
environmentYes
download_urlYesSigned link to the file; null until the render succeeded
accessibilityNoThe PDF/UA-1 verdict, when the template declares it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.26

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: values are never stored, signed and XFA forms are refused, errors are named (form_field_unknown, form_value_invalid), flatten permanently removes fillable fields, and there is a plan requirement plus a 0.5-unit cost. That is exactly the operational detail the hints (readOnlyHint=false, destructiveHint=false) 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and return shape, and every clause carries information. It is dense and somewhat run-on, with the plan/cost sentence interrupting the flow of the operational guidance, but no sentence is filler.

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 an 8-parameter tool with a nested values object and an output schema, the description covers the source-exclusivity rule, strict-vs-lenient failure handling, flatten consequences, refusal cases, and access/cost constraints. Nothing an agent needs in order 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 baseline is 3, but the description adds real meaning the schema cannot express: the three PDF inputs are mutually exclusive and only one may be passed, and strict=false routes rejected names/values into form.skipped. The flatten and error semantics are clarified in prose rather than left to the field descriptions.

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 ('Fills the fields of a PDF form') and immediately distinguishes itself from the sibling get_pdf_info by noting field names come from that tool's listing. The scope — fill a form and return a render with download_url and a form report — is unmistakable.

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 a hard selection rule for the three input routes ('Pass exactly one PDF: source, path, or file_base64') and points at get_pdf_info to discover field names, so the agent knows how to prepare the call. It lacks explicit when-not guidance (e.g. use render instead if you only want a copy of the PDF), which keeps it 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.