Skip to main content
Glama

pdf_annotate

Apply annotations to PDFs using keyword searches, regex patterns, or predefined rules, then save the annotated document to a specified output path.

Instructions

Applies annotations to a PDF document. [Input: PDF (.pdf) | Output: PDF (.pdf)]

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": {
      "input": "<input>",
      "output": "<output>"
    },
    "name": "pdf_annotate"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesThe input PDF file path.
regexNoRegex pattern to find and annotate.
rulesNoList of pattern/rule-based annotation objects (type, color, search, regex, occurrence).
outputYesThe output PDF file path.
searchNoKeyword text to find and annotate.
annotationsNoA list of annotation objects to apply.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and does very little with it. It does not state whether existing annotations are preserved, whether the input file is modified or a new file written to the output path, or what happens when a pattern matches nothing.

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?

Two compact clauses with zero filler, and the input/output format tag is a useful, front-loaded convention. The terseness borders on under-specification rather than padding, but nothing written is wasteful.

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

Completeness2/5

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

This is a six-parameter mutation tool with no annotations and no output schema, and its description is a single generic sentence. An agent cannot tell from it which parameters belong together, what an annotation object contains, or what the output guarantees are.

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 is documented in the schema itself, which sets the baseline at 3. The description adds nothing beyond that—no explanation of how search, regex, rules, and annotations interact or are mutually exclusive—so it neither helps nor hurts.

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

Purpose3/5

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

"Applies annotations to a PDF document" names a verb and resource, so the general intent is clear, but it never says what kind of annotations (highlights, notes, regex/keyword matches) or what the result looks like. Nothing distinguishes it from document-rewriting siblings such as pdf_bates or pdf_flatten.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites (does the PDF need to be unencrypted or text-based?), and no signposting to alternatives. Crucially, the four selection parameters (search, regex, rules, annotations) can be used in different modes, and the description says nothing about choosing among them.

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