Skip to main content
Glama

stamp_pdf

Apply a diagonal, semi-transparent watermark or status stamp such as CONFIDENTIAL or DRAFT to every page of an existing vector PDF for clear labeling and document control.

Instructions

Applies a diagonal semi-transparent watermark or status stamp (e.g. "CONFIDENTIAL", "DRAFT", "PROPRIETARY") across all pages of an existing vector PDF using pdf-lib.

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_base64": "<pdf_base64>",
      "watermark_text": "<watermark_text>"
    },
    "name": "stamp_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNoWatermark color: "red", "gray", or "blue" (default: "red")red
opacityNoWatermark opacity from 0.05 (subtle) to 0.5 (prominent) - default: 0.15
font_sizeNoFont size of watermark text in points (default: 54)
pdf_base64YesBase64-encoded PDF string (e.g. output from render_pdf or render_template)
watermark_textYesWatermark text to stamp diagonally across each page (e.g. "CONFIDENTIAL", "DRAFT", "PROPRIETARY")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose meaningful traits: diagonal orientation, semi-transparency, all-page scope, and a constraint that the input must be a vector PDF. It omits whether the source is mutated or a new PDF is returned, the response format, and any failure behavior for malformed or encrypted inputs.

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?

A single front-loaded sentence with no filler; every clause adds information (appearance, scope, input type, technique).

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?

Parameters are fully covered by the schema, but with no annotations and no output schema the definition should say what the tool returns (base64 PDF? new file?) and whether the original is preserved. That gap matters for an agent deciding how to chain it with render_pdf or compress_pdf.

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 defaults, enum values, and ranges are already documented. The description adds only indirect clues ('semi-transparent' implying opacity, 'diagonal' implying fixed rotation) and adds nothing new about pdf_base64 or watermark_text.

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 ('Applies a diagonal semi-transparent watermark or status stamp') with the target ('all pages of an existing vector PDF') and implementation ('using pdf-lib'). No sibling tool in the list does watermarking, so the agent can distinguish it immediately.

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

Usage Guidelines3/5

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

Usage is implied by the purpose, and 'existing vector PDF' implicitly scopes it to PDFs already produced (e.g. by render_pdf/render_template). But there is no explicit when-to-use clause, no exclusion, and no reference to related siblings like compress_pdf or merge_pdfs that an agent might chain with.

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