Add text watermark to PDF
pdf_watermarkStamp 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
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Font size in points, default 48 | |
| text | Yes | Watermark text, WinAnsi characters only | |
| color | No | Hex #rgb or #rrggbb, default #808080 | |
| pages | No | 1-based page spec such as "1-3,5"; default all pages | |
| opacity | No | Default 0.15 | |
| password | No | Password to open the input, only needed for a user-password PDF (owner-locked files with an empty user password open without it). | |
| pdf_path | Yes | PDF 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. | |
| position | No | Default center | |
| rotation | No | Degrees counter-clockwise as the viewer sees it, default 45 | |
| output_path | No | Path 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
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | Size of the produced PDF in bytes | |
| output_path | No | Absolute path written, when output_path was supplied | |
| resource_uri | No | pdfops:// uri of the inline application/pdf resource, when output_path was omitted |