add_watermark

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Watermark MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-watermark -- dnx GroupDocs.Watermark.Mcp --yes
Folders, licensing and more →

add_watermark stamps a text watermark across a document and saves a watermarked copy. fontSize and rotation control how it looks — a diagonal CONFIDENTIAL is rotation: -45. Example prompt: “Add a diagonal DRAFT watermark to this contract”.

Tool description (as the AI agent sees it):

Adds a text watermark to a document and saves the watermarked file to storage. Supports PDF, DOCX, XLSX, PPTX, PNG, JPG, and 50+ more document and image formats. Call this tool immediately whenever the user asks to add a watermark, stamp text onto a document, or mark a document as draft/confidential. Do NOT pre-check whether files exist — just pass the filename the user provided. Returns a saved-path message (‘Added text watermark “” to “”’) and the download URL or storage path. On failure, the response text starts with ‘Watermarking failed for’ followed by the underlying exception type, message, and inner-exception chain.

Parameters

NameTypeRequiredDescription
fileobjectyesThe document — see FileInput shape
textstringyesWatermark text to add
fontSizeintegernoFont size (default 36)
rotationintegernoRotation angle in degrees (default -45)
passwordstringnoPassword for protected documents

Example call

{
  "name": "add_watermark",
  "arguments": {
    "file": {
      "filePath": "contract.pdf"
    },
    "text": "CONFIDENTIAL",
    "fontSize": 48,
    "rotation": -45
  }
}

Result

A saved-path message naming the watermarked file in your output folder; the original is left alone.

The watermark is applied to the document as a watermark object — which is what makes it findable by search_watermarks and removable by remove_watermarks later.

On failure the text starts with Watermark failed for, followed by the exception type and message.

Example prompts

  • “Add a diagonal CONFIDENTIAL watermark to contract.pdf.”
  • “Stamp DRAFT across every page of this deck.”
  • “Watermark these files with today’s date and the client name.”

See it used end-to-end: Watermark documents with AI agents.