Skip to main content
Glama

fill_pdf_form

Fill PDF form fields by providing field name-value pairs. Accepts base64-encoded PDF, optionally flattens fields to make them non-editable. Returns filled PDF as base64.

Instructions

Fill form fields in a PDF.

Args: pdf_base64: Base64-encoded PDF file with form fields. fields: Field name-value pairs to fill. flatten: Whether to flatten the form (make fields non-editable).

Returns: Base64-encoded filled PDF.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_base64Yes
fieldsYes
flattenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Given no annotations, the description must disclose behavior. It mentions the flatten option and that it returns a base64-encoded PDF, but lacks details on error handling, missing fields, or potential side effects. It does not contradict anything, as no annotations exist.

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?

The description is concise (5 lines) and well-structured with Args and Returns. Every sentence adds value without redundancy, making it easy to parse quickly.

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?

While the description covers basic usage and return value, it misses edge cases like what happens if fields are empty or if the PDF lacks form fields. Given the tool's simplicity and the presence of an output schema, it is adequate but not exhaustive.

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 description coverage is 0%, so the description compensates by explaining each parameter (e.g., 'pdf_base64: Base64-encoded PDF with form fields'). This adds meaning beyond the schema's titles, though more detail (e.g., accepted formats for fields) would improve it.

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 clearly states 'Fill form fields in a PDF,' specifying a precise verb and resource. This distinguishes it from sibling tools like merge_pdfs or generate_pdf_from_html, which serve different purposes.

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 explains the tool's function and parameters but does not explicitly state when to use it versus alternatives like inspect_pdf_form (to check fields) or generate_pdf_from_html (to create new forms). No when-not or comparative guidance is provided.

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/dokmatiq/docgen-sdks'

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