Skip to main content
Glama

Redact a PDF (true removal)

pdf_redact
Destructive

Permanently redact a PDF: remove the given text occurrences (terms) or rectangular areas (page, x, y, width, height in PDF points) by deleting them from the content stream, then verify no residue remains. Unlike overlay boxes, this is irreversible removal. Use this when the user asks to redact or scrub sensitive content from a document.

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": {
      "file": "<file>"
    },
    "name": "pdf_redact"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesBase64-encoded file bytes (no data: URL prefix).
areasNoRectangles to remove (PDF coordinate space).
termsNoText occurrences to remove.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructive=true and readOnly=false, but the description adds real behavioral context beyond them: removal is permanent and irreversible, it deletes content from the content stream rather than covering it, and it performs a post-operation verification that no residue remains. That is exactly the kind of consequence detail an agent needs before invoking a destructive tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the operation and its irreversibility, followed by input modes and the usage trigger. No filler, and the differentiator against overlay boxes is placed early.

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 no output schema, the description carries the return-behavior burden and does so partly (verification of residue), and it covers both input modes and the destructive nature. It omits edge-case behavior such as what happens when terms are not found, handling of protected/encrypted PDFs, and how the redacted document is returned.

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 100%, so the baseline is 3, but the description adds value: it clarifies that terms and areas are two alternative redaction modes, and specifies that area coordinates are in PDF points. It still does not explain how the two modes interact when both are supplied, which keeps it short of a 5.

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

Purpose5/5

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

States a specific verb (redact) plus the precise mechanism (deleting text occurrences or rectangles from the content stream), and explicitly distinguishes itself from an overlay-box approach used by other tools. An agent can tell it apart from siblings like pdf_scan_pii or pdf_compress without opening the schema.

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

Usage Guidelines4/5

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

Gives a clear triggering condition: 'Use this when the user asks to redact or scrub sensitive content from a document.' It contrasts with overlay boxes, but does not name a sibling alternative (e.g., pdf_scan_pii for detection-only, or a hypothetical non-destructive masking tool), so the when-not guidance is only partial.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources