Skip to main content
Glama

Add text watermark to PDF

pdf_watermark
Idempotent

Stamp a diagonal text watermark on pages of a PDF (default: centered, 45 degrees, grey, 15% opacity). Text is upright and centered for any page size or existing page rotation. Standard Helvetica only: characters outside WinAnsi (e.g. CJK, emoji) fail with unsupported_characters. Use this for DRAFT / CONFIDENTIAL stamps; use pdf_page_numbers for numbering. Returns the result inline as an application/pdf resource; the source is never modified.

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": {
      "pdf_path": "<pdf_path>",
      "text": "<text>"
    },
    "name": "pdf_watermark"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoFont size in points, default 48
textYesWatermark text, WinAnsi characters only
colorNoHex #rgb or #rrggbb, default #808080
pagesNo1-based page spec such as "1-3,5"; default all pages
opacityNoDefault 0.15
passwordNoPassword to open the input, only needed for a user-password PDF (owner-locked files with an empty user password open without it).
pdf_pathYesPDF source: an https:// URL or a data:application/pdf;base64,… URI (this hosted server cannot read local file paths).
positionNoDefault center
rotationNoDegrees counter-clockwise as the viewer sees it, default 45

Output Schema

NameRequiredDescriptionDefault
bytesYesSize of the produced PDF in bytes
resource_uriNopdfops:// uri of the inline application/pdf resource

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the rendering behaviour (text stays upright and centered regardless of page size or pre-existing page rotation), the Helvetica/WinAnsi limitation with the exact error string 'unsupported_characters', and that output is returned inline as an application/pdf resource while the source is never modified. That last point is consistent with destructiveHint=false and readOnlyHint=false (a new document is produced). It does not mention size limits or processing cost, which keeps it off a 5.

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?

Four dense sentences: capability and defaults first, then rendering guarantees, then the failure mode, then routing and return value. No filler, and the most decision-relevant facts are front-loaded.

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?

Despite nine parameters and a sibling-rich namespace, the description covers the failure mode an agent is most likely to hit (non-WinAnsi characters), the output transfer mechanism, and sibling routing. The output schema carries return details, so nothing material is missing.

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 coverage is 100%, so every parameter is already documented, including the rotation-as-viewer-sees-it semantics and the #rgb/#rrggbb color format. The description's parenthetical defaults restate schema values rather than adding new meaning; the one genuine addition is clarifying that the text remains upright and centered on rotated pages, which is a rendering behaviour rather than a parameter rule. Baseline 3 applies.

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?

Opens with a specific verb+resource+visual outcome: 'Stamp a diagonal text watermark on pages of a PDF' with defaults in parentheses. It explicitly distinguishes itself from the numbering sibling, so an agent can route between pdf_watermark and pdf_page_numbers without opening either schema.

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

Usage Guidelines5/5

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

Gives a concrete use case ('DRAFT / CONFIDENTIAL stamps') and names the alternative tool plus the condition that selects it ('use pdf_page_numbers for numbering'). The only minor gap is that other siblings like pdf_fill or pdf_metadata aren't contrasted, but the primary confusion pair is resolved.

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.