Skip to main content
Glama
marc-hanheide

PDF Redaction MCP Server

redact_text_by_search

Redact all occurrences of specified text in a loaded PDF. Modify in-memory with customizable fill and overlay text, then save_pdf to apply.

Instructions

Redact all occurrences of specified text strings in a loaded PDF document.

The document must be loaded first using load_pdf. Modifications are made in-memory. Use save_pdf to write the changes to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fill_colorNoRGB color for redaction box (0-1 range). Default is black (0,0,0)
text_colorNoRGB color for overlay text (0-1 range). Default is white (1,1,1)
document_idYesIdentifier of the loaded document
overlay_textNoOptional text to display over redacted area, use this to explain what has been redacted here
search_stringsYesList of strings to search for and redact

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the burden of explaining behavior. It discloses that modifications are in-memory and require save_pdf, which is valuable context. However, it does not mention irreversibility, appearance of redaction, or whether text is physically removed, leaving gaps in transparency.

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?

The description is three sentences, front-loaded with the core action, followed by essential workflow notes. No redundant or unnecessary information is present; every sentence earns its place.

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?

The tool is part of a clear workflow (load, redact, save), and the description covers both prerequisite and saving steps. An output schema exists, so return values need not be explained. It lacks only explicit guidance on choosing this tool over coordinate-based redaction, but overall is sufficiently complete for the tool's complexity.

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%, and each parameter has its own description in the schema. The tool description adds little beyond clarifying that search_strings are 'specified text strings' and the document must be loaded, but the schema already handles parameter meaning effectively.

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?

The description clearly states the tool redacts all occurrences of specified text strings in a loaded PDF, using a specific verb and resource. It distinguishes itself from sibling tools like redact_by_coordinates and redact_images by focusing on text-based redaction.

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?

The description provides clear workflow context: the document must be loaded first using load_pdf, and changes must be saved via save_pdf. While it does not explicitly mention alternatives like redact_by_coordinates, the prerequisites and persistence steps are clearly communicated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marc-hanheide/pdf-redaction-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server