Skip to main content
Glama

pdf_redact

Permanently redacts sensitive PDF text, regex patterns, or selected bounding areas using blackout boxes with optional overlay text to remove confidential information before sharing.

Instructions

Permanently redacts sensitive text glyphs, patterns, regexes, or specified bounding areas with blackout boxes and optional overlay text. [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_redact"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoX coordinate.
yNoY coordinate.
pageNoPage number to redact (1-based).
inputYesPath to the PDF to redact.
queryNoSearch keyword or pattern to redact permanently.
regexNoRegular expression to match and redact.
widthNoWidth.
heightNoHeight.
outputYesPath to save the redacted PDF.
occurrenceNoOccurrence filter: 'all', 'first', 'last', or indices.
overlay_textNoOptional overlay text (e.g. '[REDACTED]').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/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; it does disclose the most important trait, that redaction is permanent and irreversible, plus the blackout/overlay behavior. It omits other relevant behavior: whether the source PDF is modified in place, what happens when nothing matches, and whether the underlying text layer is removed.

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 tightly written sentences, front-loaded with the core action and the permanence guarantee, followed by a compact input/output format tag. Little waste, though the format tag is low-value boilerplate given the parameter names.

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?

For an 11-parameter, unannotated, no-output-schema mutation tool, the description covers the headline behavior but leaves mode-selection and parameter interaction unanswered. An agent can call it, but may guess wrong about how to combine the coordinate parameters or interpret occurrence filters.

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 the baseline is 3 and the description only adds marginal meaning over the schema. It does not explain that x/y/width/height must be combined as a bounding box, nor how 'occurrence' values like 'all'/'first'/'last'/indices interact with query or regex.

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?

Names a specific verb ('redacts') plus the concrete targets (glyphs, patterns, regexes, bounding areas) and the output effect (blackout boxes, overlay text), so an agent immediately knows what the tool does. It does not name a sibling such as pdf_annotate or pdf_extract_patterns to differentiate itself, which keeps it from a 5.

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?

No statement of when to use this versus alternatives (e.g., non-destructive annotation, pattern extraction) and no guidance on choosing between keyword, regex, or coordinate-based redaction. The listed modalities are implied modes rather than usable selection criteria, and there are no exclusions or prerequisites.

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