Skip to main content
Glama
pdf4me
by pdf4me

fill_pdf_form

Fill form fields in a local PDF by providing the file path and a JSON object of field/value pairs, with optional output settings.

Instructions

Fill form fields in a local PDF using the PDF4me FillPdfForm API. Provide the local PDF path and a JSON object of field/value pairs in form_data. Optionally specify output directory and output file name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesLocal path to the template PDF file to fill.
form_dataYesForm field values as key/value pairs (for example {"firstname": "John"}).
output_dirNo
output_file_nameNo
Behavior2/5

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

With no annotations provided, the description must disclose behavioral traits such as side effects and output. It states inputs (file path, form data, optional output parameters) but does not clarify whether the original file is modified or a new file is created, nor how output_dir and output_file_name are used. This leaves significant ambiguity for an agent.

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 two sentences and front-loaded with the main action. The phrase 'using the PDF4me FillPdfForm API' is unnecessary implementation detail, but the overall structure is concise and to the point, with no significant wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter tool with no output schema, the description provides the core inputs but omits output behavior, return value, and error handling. An agent would not know how to retrieve the resulting filled PDF or handle failures, which is a clear gap. It is adequate for a simple fill operation but incomplete for autonomous use.

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?

Input schema has 50% coverage, with file_path and form_data described, but output_dir and output_file_name lack schema descriptions. The description repeats the first two and mentions 'optionally specify output directory and output file name', but does not explain their exact semantics (e.g., where the filled PDF is saved). It partially compensates for the gap but not fully.

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 uses the specific verb 'Fill form fields' and identifies the resource as a 'local PDF', which clearly differentiates it from sibling tools like add_form_fields_to_pdf (which likely creates fields) and extract_form_data_from_pdf. It explicitly states what the tool does, making intent unambiguous.

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?

The description implies use for populating existing PDF form fields, but it does not provide explicit when-to-use guidance or mention alternatives. There is no exclusion of cases like PDFs without form fields or interaction with add_form_fields_to_pdf, leaving the agent to infer context from the tool name and sibling list.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdf4me/pdf4me-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server