Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

fill_forms

Fills existing PDF form fields with specified values by matching field names and page numbers; retrieve field names first to populate forms accurately.

Instructions

Fill existing form fields in a PDF document.

Example fields format:
[
    {
        "fieldName": "field_name_from_form_info",
        "pages": "1",
        "text": "Value to fill"
    }
]

Use 'read_pdf_forms_info' first to get the fieldName values of the form.

Ref: https://developer.pdf.co/api/pdf-add.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.
nameNoFile name for the generated output. (Optional)
fieldsYesList of fields to fill. Each field is a dict with 'fieldName', 'pages', and 'text' properties.
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
profilesNoExtra engine options for this endpoint as a JSON object encoded in a string. The options differ per endpoint; see https://developer.pdf.co/api/profiles. (Optional)
expirationNoLifetime of the output link in minutes; the output file is deleted afterwards. API default is 60; the maximum depends on the plan. (Optional)
httppasswordNoHTTP auth password if required to access source url. (Optional)
httpusernameNoHTTP auth user name if required to access source url. (Optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.0.11
    • addedInput schema / properties / expiration
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Lifetime of the output link in minutes; the output file is deleted afterwards. API default is 60; the maximum depends on the plan. (Optional)",
      +  "title": "Expiration"
      +}
    • addedInput schema / properties / profiles
      Added value: +{
      +  "default": "",
      +  "description": "Extra engine options for this endpoint as a JSON object encoded in a string. The options differ per endpoint; see https://developer.pdf.co/api/profiles. (Optional)",
      +  "title": "Profiles",
      +  "type": "string"
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It reveals the field payload shape and the dependency on read_pdf_forms_info, which is useful, but it never says that a new output file is produced (with a lifetime governed by 'expiration') or what happens to fields that don't match existing names.

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, followed by the fields example and the prerequisite call in priority order. The reference URL is the only marginally expendable element; everything else earns its place.

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 an 8-parameter generation tool with no output schema, the description should say what comes back (a link to the filled PDF, subject to expiry). It covers input preparation well but leaves the return contract and partial-failure behavior unaddressed.

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?

With 100% schema coverage the baseline would be a 3, but the description adds real value beyond the schema: the 'fields' array items are untyped ('items': {}), and the worked example supplies the 'fieldName'/'pages'/'text' keys that the schema omits. Other parameters are left to their own descriptions.

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?

States a specific verb and resource ('Fill existing form fields in a PDF document'), and the word 'existing' implicitly separates it from create_fillable_forms. It does not, however, explicitly distinguish itself from pdf_add_annotations_images_fields, which also touches form fields, so sibling differentiation is only partial.

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 concrete prerequisite: call 'read_pdf_forms_info' first to obtain the fieldName values, which is exactly the context an agent needs before invoking. It stops short of stating when not to use it (e.g., when the PDF has no form fields, or when creating a form rather than filling one).

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