Skip to main content
Glama

Write text or stamp images onto a PDF

annotate_pdf
Read-onlyIdempotent

For PDFs without fillable fields (scans, flat forms): place text and PNG/JPG images (e.g. a signature) at positions on pages and return the new PDF. Coordinates are PDF points from the TOP-LEFT of the page (72 points = 1 inch). Get page sizes from inspect_pdf.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "items": "<items>"
    },
    "name": "annotate_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesThings to place.
file_idNoA file id from POST /api/v1/files or an earlier result. Use this, template_id or pdf_base64.
file_nameNoName for the returned file (default annotated.pdf).
pdf_base64NoThe PDF, base64 encoded (max 15 MB). Prefer file_id for big files.
template_idNoA template id from list_templates.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

The description explains that a new PDF is returned rather than the input being mutated, which is consistent with readOnlyHint=true and idempotentHint=true. It also adds the coordinate convention and the prerequisite step of reading page sizes, though it says nothing about limits on items or file size beyond what the schema already carries.

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?

Three short sentences: applicability first, capability second, coordinate convention third, plus a pointer to inspect_pdf. No restated or filler content.

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

Completeness5/5

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

For a five-parameter tool with no output schema, the description covers applicability, what gets written, coordinate units, and how to obtain the page dimensions. An agent has enough to call it correctly without opening the schema.

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 coverage is 100%, so the baseline would be 3, but the description adds the unit conversion '72 points = 1 inch' and reiterates the top-left origin, which the schema does not spell out as a conversion. The remaining parameters (file_id, template_id, pdf_base64, file_name) are not discussed, so it does not fully compensate.

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?

Uses a specific verb and resource ('place text and PNG/JPG images ... on pages and return the new PDF') and scopes it to 'PDFs without fillable fields (scans, flat forms)', which separates it cleanly from fill_pdf and inspect_pdf listed among siblings.

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 clear when-to-use condition (flat PDFs with no form fields) and points to inspect_pdf for the prerequisite page sizes. It never explicitly names fill_pdf as the alternative for fillable forms, so the exclusion is implied rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources