Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

pdf_add_annotations_images_fields

Add text, images, hyperlinks, and filled form fields to PDFs, including scanned files, to update or modify documents and forms.

Instructions

Add text, images, forms, other PDFs, fill forms, links to external sites and external PDF files. You can update or modify PDF and scanned PDF files.

This tool supports three main ways to add content:

1. **annotations**: Add text, links, shapes, etc.
   Properties: text, x, y, size, pages, color, link, fontName, fontItalic, fontBold, fontStrikeout, fontUnderline

2. **images**: Add images or other PDF content
   Properties: url, x, y, width, height, pages

3. **fields**: Fill existing form fields
   Properties: fieldName, pages, text, fontName, size, fontBold, fontItalic, fontStrikeout, fontUnderline

Example annotations:
[{"text": "Sample Text - Click here to test link", "x": 250, "y": 240, "size": 24, "pages": "0-", "color": "CCBBAA", "link": "https://pdf.co/", "fontName": "Comic Sans MS", "fontItalic": true, "fontBold": true, "fontStrikeout": false, "fontUnderline": true}]

Example images:
[{"url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png", "x": 270, "y": 150, "width": 159, "height": 43, "pages": "0"}]

Example fields:
[{"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]", "pages": "1", "text": "Joan B.", "fontName": "Arial", "size": 6, "fontBold": true, "fontItalic": true, "fontStrikeout": true, "fontUnderline": true}]

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)
fieldsNoArray of form field objects to fill PDF form fields. Each object can have: 'fieldName' (string), 'pages' (string), 'text' (string), 'fontName' (string), 'size' (number), 'fontBold' (boolean), 'fontItalic' (boolean), 'fontStrikeout' (boolean), 'fontUnderline' (boolean). (Optional)
imagesNoArray of image objects to add images to PDF. Each object can have: 'url' (string), 'x' (number), 'y' (number), 'width' (number), 'height' (number), 'pages' (string). (Optional)
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
encryptNoEncrypt output file. (Optional)
flattenNoFlatten filled form fields and annotations into PDF content. Set to true to disable editing of filled form fields in the output PDF. (Optional)
passwordNoPassword for the PDF file. (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)
expirationNoSet the expiration time for the output link in minutes. After this specified duration, any generated output file(s) will be automatically deleted. (Optional)
annotationsNoArray of annotation objects to add text, links, shapes, etc. Each object can have: 'text' (string), 'x' (number), 'y' (number), 'size' (number), 'pages' (string), 'color' (string hex), 'link' (string URL), 'fontName' (string), 'fontItalic' (boolean), 'fontBold' (boolean), 'fontStrikeout' (boolean), 'fontUnderline' (boolean). (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. Changed1 schema field changedv0.0.11
    • 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

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden but omits key behavioral details: whether the original PDF is modified in place or a new file is generated, what the output return value looks like (e.g., expiring link), authentication requirements (api_key parameter exists but not explained), and effects of flatten/encrypt. It does note scanned PDF support and that fields must already exist, which is some value.

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 front-loaded with a summary and organized into numbered sections with examples, making it easy to scan. Some redundancy exists (the opening list is repeated in the sections), but examples earn their place by illustrating complex array inputs.

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?

Given 13 parameters, no output schema, and no annotations, the description covers the core content-addition behavior but leaves gaps: output format/expiration behavior, page range syntax (e.g., '0-'), interaction of flatten and encrypt, and differentiation from sibling fill_forms. It is adequate but incomplete for an agent to invoke confidently without consulting external references.

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 100%, so the baseline is 3. The description adds concrete JSON examples for the three array parameters (annotations, images, fields), which clarify structure and expected value types beyond the schema text. It does not cover all parameters (e.g., flatten, encrypt, expiration) but the schema handles those adequately.

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?

The description clearly states the tool adds annotations, images, and fills form fields in PDFs, using specific verbs and resources. However, it does not distinguish this tool from sibling tools like fill_forms or create_fillable_forms, leaving ambiguity about when to choose this multi-purpose tool over specialized ones.

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 explicit guidance on when to use this tool versus alternatives. The 'three main ways' section describes capabilities but not selection criteria, and despite the presence of fill_forms and create_fillable_forms siblings, no comparison or exclusion is provided.

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