Skip to main content
Glama

Add text watermark to PDF

pdf_watermark
DestructiveIdempotent

Stamp diagonal DRAFT or CONFIDENTIAL text watermarks on PDF pages, with control over pages, opacity, color, and rotation. Returns a new PDF while leaving the source file unchanged.

Instructions

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 written to output_path, or inline as an application/pdf resource when output_path is omitted (results over 7 MB are never returned inline: pass output_path); an existing file at output_path is overwritten. 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: a path to a .pdf file inside the allowed directories (PDFOPS_ROOT, default the working directory), an https:// URL, or a data:application/pdf;base64,… URI. Use a URL or data URI when this server runs remotely (Smithery, hosted gateways) where local paths do not exist.
positionNoDefault center
rotationNoDegrees counter-clockwise as the viewer sees it, default 45
output_pathNoPath of a .pdf file to write the result to, inside the allowed directories (PDFOPS_ROOT, default the working directory); an existing file there is overwritten. Omit when running remotely: the PDF is then returned inline as an application/pdf resource for the client to save.

Output Schema

NameRequiredDescriptionDefault
bytesYesSize of the produced PDF in bytes
output_pathNoAbsolute path written, when output_path was supplied
resource_uriNopdfops:// uri of the inline application/pdf resource, when output_path was omitted

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only flag destructive/openWorld/idempotent, while the description adds what actually happens: the source is never modified, an existing output_path file is overwritten, inline delivery is capped at 7 MB, and non-WinAnsi text fails with unsupported_characters. Rendering behavior (upright, centered for any page size or rotation) is also disclosed.

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 and defaults, then limitations, then alternatives and return behavior. It is dense and parenthetical-heavy in the final sentence, but essentially every clause carries actionable information.

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 10-parameter mutation tool with an output schema, the description covers the risky bits an agent needs: font/charset failure mode, overwrite semantics, source safety, and the inline size cap that forces output_path. Nothing material is left to inference.

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 already 100%, so the schema documents every parameter including defaults. The description reinforces defaults (centered, 45 degrees, grey, 15% opacity) and the output_path inline-vs-file tradeoff, but adds little beyond what the schema text already says.

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?

States a specific verb and resource ('Stamp a diagonal text watermark on pages of a PDF') plus concrete defaults, and explicitly routes numbering use cases to pdf_page_numbers. An agent can distinguish this from siblings without opening the schema.

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 an explicit when-to-use ('DRAFT / CONFIDENTIAL stamps') and names the sibling alternative for numbering. It lacks guidance on when not to use it (e.g. editing existing page content vs. pdf_edit), but the primary routing decision is covered.

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