Skip to main content
Glama
sandraschi

pdf-mcp

pdf_annotate

Add watermarks, stamps, highlights, underlines, headers, footers, and page numbers to PDFs. Search text to mark occurrences or annotate specific pages for review.

Instructions

Add annotations and markup to PDFs.

Watermark, stamp, highlight, underline, header/footer, and page numbers.

Return Format

A dict with keys:

  • success: bool - whether the operation succeeded

  • message: str - human-readable summary

  • operation-specific keys:

    • watermark/stamp/header_footer/page_numbers: {path}

    • highlight: {path, occurrences}

    • underline: {path, occurrences} On failure: {success: False, error, error_type}.

Examples

await pdf_annotate(operation="watermark", path="report.pdf", text="CONFIDENTIAL", opacity=0.3) {"success": true, "path": ".../report_watermark_....pdf", "message": "Added watermark to report.pdf, saved to report_watermark_....pdf."}

await pdf_annotate(operation="highlight", path="report.pdf", search_text="revenue") {"success": true, "path": ".../report_highlight_....pdf", "occurrences": 3, "message": "Highlighted 3 occurrences of 'revenue' in report.pdf."}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoX position for stamp annotation. Default 50.
yNoY position for stamp annotation. Default 50.
pageNoTarget page number (1-indexed). Applies to all pages if omitted.
pathYesPath to the PDF file.
textNoText content for watermark, stamp, header, or footer.
colorNoHighlight color as hex. Default #FFFF00.#FFFF00
startNoStarting page number. Default 1.
footerNoFooter text.
headerNoHeader text.
opacityNoOpacity for watermark. Default 0.3.
positionNoWatermark position: center, top_left, top_right, bottom_left, bottom_right, tile.center
font_sizeNoFont size for header/footer/page numbers. Default 10.
operationYes
image_pathNoPath to image file for image watermark.
output_pathNoOutput path. Auto-generated if omitted.
search_textNoText to search for highlighting or underlining.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoHuman-readable summary
successNoWhether the operation succeeded

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, and the description goes beyond them by disclosing the auto-generated output path behavior (saving to report_watermark_...pdf), the success/error return shape, and occurrence counts for search-based operations. It does not address whether the original file is preserved or permission requirements.

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?

The description is front-loaded with purpose, then operations, return format, and examples using clear headings. The Return Format section partly duplicates the existing output schema, which is redundant, but the examples earn their space.

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?

With 16 parameters and an output schema present, the description need not repeat return values, yet it does so. Its main gap is the operation-to-parameter contract: with seven enum operations sharing one flat parameter bag, the description only hints via examples which parameters apply to which operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 94%, so the baseline is 3, and the worked examples add genuine meaning by pairing specific operations with their relevant parameters (watermark with text/opacity, highlight with search_text). It still never states the mapping of which parameters are required or valid per operation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Add annotations and markup to PDFs') and enumerates the concrete operations (watermark, stamp, highlight, underline, header/footer, page numbers), which makes it distinguishable from content-removal siblings like pdf_redact. It stops short of naming a sibling it is not, so it does not reach the top of the scale.

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 only implied through the operation list and the two examples; there is no explicit statement of when to choose this tool over pdf_manipulate or pdf_redact, and no exclusions or prerequisites are given.

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