Skip to main content
Glama
sandraschi

pdf-mcp

pdf_forms

Read-only

List, fill, flatten, export, and auto-fill interactive PDF form fields, including LLM-guided data entry.

Instructions

Handle interactive form fields.

List, fill, flatten, export, and auto-fill (LLM-guided) PDF form fields.

Return Format

A dict with keys:

  • success: bool

  • message: str - human-readable summary

  • operation-specific keys:

    • list_fields: {fields: [{name, type, value, page, rect}]}

    • fill/flatten: {path}

    • export_data: {data: {field_name: value}}

    • auto_fill: {path, filled, missing} On failure: {success: False, error, error_type}.

Examples

await pdf_forms(operation="list_fields", path="form.pdf") {"success": true, "fields": [{"name": "name", "type": "text", "value": "", "page": 0, "rect": [...]}], "message": "Found 1 form fields in form.pdf."}

await pdf_forms(operation="fill", path="form.pdf", fields={"name": "Ada"}) {"success": true, "path": ".../form_fill_....pdf", "message": "Filled 1 form fields in form.pdf, saved to form_fill_....pdf."}

await pdf_forms(operation="auto_fill", path="form.pdf", source="source.pdf") {"success": true, "path": ".../form_autofill_....pdf", "filled": 3, "missing": [], "message": "Auto-filled 3 fields in form.pdf from source.pdf."}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the PDF file.
textNoSource text driving auto_fill (alternative to source).
fieldsNoDict of field_name: value for fill operation.
sourceNoSource PDF path whose text drives auto_fill.
operationYes
output_pathNoOutput path. Auto-generated if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoHuman-readable summary
successNoWhether the operation succeeded

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

C2.9/5.0
Behavior1/5

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

Annotations declare readOnlyHint=true, yet the description states the tool fills, flattens, and auto-fills forms, writing new PDFs to output_path (fill/flatten return {path}, auto_fill returns {path, filled, missing}). Writing files modifies the environment, so the description contradicts the read-only annotation.

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 purpose and an operation list, then cleanly sectioned into Return Format and Examples with headers. It is a bit long and the return-format block duplicates the output schema, but every part is readable and none is filler.

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

Completeness4/5

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

For a 6-parameter, multi-operation tool the description covers the operation set, key inputs, success/failure shapes, and worked examples. Since an output schema exists, the return-format section is redundant but not harmful; the main gap is the absence of permission/when-to-use context.

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 high (83%) and the schema already documents path, fields, source, text, and output_path with their roles. The description reiterates the operations and return shape but adds no new parameter meaning (e.g., fill value typing, flatten vs fill interaction) beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

It names a specific resource (PDF form fields) and enumerates the concrete operations (list, fill, flatten, export, auto-fill) which map cleanly onto the operation enum. However, it does nothing to distinguish this from siblings such as pdf_annotate, pdf_manipulate, or pdf_export, so the agent must infer boundaries.

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

Usage Guidelines2/5

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

There is no when-to-use / when-not-to-use guidance and no named alternatives among the many pdf_* siblings. The only hint is that auto_fill is 'LLM-guided', with no prerequisites, permissions, or conditions noted for choosing a given operation.

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