Skip to main content
Glama

Add a watermark

add_watermark
Idempotent

Stamps large, semi-transparent, rotated text like CONFIDENTIAL or DRAFT across selected PDF pages and saves the result as a new file, leaving the original unchanged.

Instructions

Writes a large, semi-transparent, rotated text (e.g. CONFIDENTIAL, DRAFT) across the middle of every page or the chosen pages of a PDF and saves the result as a new PDF; the page content stays readable underneath. For small text in a corner or a footer, use add_page_numbers. The original is not changed, and an existing output file is only replaced with overwrite: true. Encrypted PDFs cannot be saved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path of the PDF.
textYesWatermark text.
angleNoRotation in degrees; negative values rise to the right (default -45).
colorNoText colour (default red), as #rrggbb.
pagesNoPages as 1-based numbers and ranges, e.g. "1-3,5". All pages when omitted; a page outside the document is an error.
outputYesAbsolute path of the new PDF. If the file exists, the call fails unless overwrite is true.
opacityNo0.05 to 1 (default 0.2).
passwordNoPassword, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it.
font_sizeNoDefault 64.
overwriteNoAllow replacing an existing file (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.9
    • changedInput schema / properties / output / description
      Previous value: -"Absolute path of the PDF to write."New value: +"Absolute path of the new PDF. If the file exists, the call fails unless overwrite is true."
    • changedInput schema / properties / pages / description
      Previous value: -"Pages, e.g. \"1-3,5\" (1-based). All pages when omitted."New value: +"Pages as 1-based numbers and ranges, e.g. \"1-3,5\". All pages when omitted; a page outside the document is an error."
    • changedInput schema / properties / password / description
      Previous value: -"Password, if the PDF is encrypted."New value: +"Password, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it."
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, but the description adds real context beyond them: the original is never modified, an existing output is only replaced with overwrite:true, and encrypted PDFs cannot be saved even with a password. The encryption limitation is partly echoed in the password parameter schema, which keeps this from being maximal.

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?

Front-loads the action and visual outcome, then the sibling alternative, then the safety caveats. No sentence is redundant and no filler is present despite covering five distinct facts.

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

Completeness4/5

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

For a 10-parameter file-mutating tool with no output schema, the description covers what is produced, that the source is untouched, overwrite gating and encryption limits — the essentials an agent needs to call it safely. It stops short of describing the call's return value or the failure mode when an invalid page range is passed, which is a minor residual gap.

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 description coverage is 100%, so every parameter (angle, color, pages, opacity, font_size, overwrite, password) is already documented in the schema with defaults and formats. The description only alludes to rotation and transparency generically and adds no syntax, units, or constraints beyond the schema, so the baseline of 3 is correct.

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 — writing rotated, semi-transparent text across a PDF's pages and saving a new file — plus the visual result ('page content stays readable underneath'). It explicitly differentiates itself from the sibling add_page_numbers, so an agent can route between the two 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 Guidelines4/5

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

Explicitly names the alternative for a related need ('For small text in a corner or a footer, use add_page_numbers') and states the conditions for replacing an existing output file. It does not discuss prerequisites such as password availability until the encryption caveat, but the primary routing decision is unambiguous.

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