PDF Redaction MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PDF Redaction MCP ServerRedact all social security numbers and email addresses in confidential_report.pdf"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PDF Redaction MCP Server
A Model Context Protocol (MCP) server for PDF redaction using PyMuPDF (fitz). This server provides tools for loading PDFs, identifying and redacting sensitive text, and saving redacted documents.
Features
š Load and read PDF files - Extract text content from PDFs for review
š Batch text redaction - Search and redact multiple text strings at once for maximum efficiency
š Redaction tracking - Keep track of what's been redacted to prevent duplicate work
š List applied redactions - Audit trail showing which texts have been marked for redaction
š Area-based redaction - Redact specific rectangular regions by coordinates
š¾ Save redacted PDFs - Apply redactions and save with automatic naming
šØ Customizable redaction appearance - Choose redaction fill colors
š Error handling - Comprehensive error messages via MCP protocol
Related MCP server: Unredactor MCP
Installation
This project uses uv for package management. To install:
# Clone the repository
git clone <your-repo-url>
cd redact_mcp
# Install with uv
uv pip install -e .Usage
Running the Server
You can run the server using either the Python script directly or the FastMCP CLI:
Option 1: Direct Python execution (stdio transport)
python -m redact_mcp.serverOption 2: Using FastMCP CLI
# Stdio transport (default)
fastmcp run redact_mcp.server:mcp
# HTTP transport for remote access
fastmcp run redact_mcp.server:mcp --transport http --port 8000Installing in MCP Clients
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pdf-redaction": {
"command": "uv",
"args": [
"--directory",
"/path/to/redact_mcp",
"run",
"fastmcp",
"run",
"redact_mcp.server:mcp"
]
}
}
}Other MCP Clients
Use the FastMCP CLI to generate configuration for other clients:
# For Cursor
fastmcp install cursor redact_mcp.server:mcp
# For Gemini CLI
fastmcp install gemini-cli redact_mcp.server:mcp
# Generate generic MCP JSON configuration
fastmcp install mcp-json redact_mcp.server:mcpAvailable Tools
1. load_pdf
Load a PDF file and extract its text content.
Parameters:
pdf_path(string): Path to the PDF file to load
Returns: The full text content of the PDF, organized by pages
Example:
Load the PDF at /path/to/document.pdf2. redact_text
Redact all instances of specific texts in a loaded PDF. This tool now accepts multiple texts at once for efficient batch redaction. It automatically tracks which texts have already been redacted to prevent duplicate work.
Parameters:
pdf_path(string): Path to the loaded PDF filetexts_to_redact(list of strings): List of text strings to search for and redactfill_color(tuple, optional): RGB color (0-1 range) for redaction box. Default: (0, 0, 0) - black
Returns: Summary of redaction operations, including which texts were newly redacted and which were skipped (already redacted)
Examples:
# Single text
Redact ["confidential"] in /path/to/document.pdf
# Multiple texts at once (recommended for efficiency)
Redact ["John Doe", "123-45-6789", "john.doe@email.com"] in /path/to/document.pdfNote: The tool tracks which texts have been redacted and will skip any texts that were already processed, preventing duplicate redactions.
3. redact_area
Redact a specific rectangular area on a PDF page.
Parameters:
pdf_path(string): Path to the loaded PDF filepage_number(int): Page number (1-indexed)x0(float): Left x coordinatey0(float): Top y coordinatex1(float): Right x coordinatey1(float): Bottom y coordinatefill_color(tuple, optional): RGB color (0-1 range) for redaction box. Default: (0, 0, 0) - black
Returns: Confirmation message
Example:
Redact the area from (100, 100) to (300, 150) on page 1 of /path/to/document.pdf4. save_redacted_pdf
Apply all pending redactions and save the PDF.
Parameters:
pdf_path(string): Path to the loaded PDF fileoutput_path(string, optional): Custom output path. If not provided, appends "_redacted" to original filename
Returns: Path to the saved redacted PDF
Example:
Save the redacted version of /path/to/document.pdf5. list_loaded_pdfs
List all currently loaded PDF files.
Parameters: None
Returns: List of loaded PDF paths with page counts
6. list_applied_redactions
List all redactions that have been applied to loaded PDF(s). New tool for tracking redaction progress and avoiding duplicate work.
Parameters:
pdf_path(string, optional): Path to a specific PDF. If not provided, lists redactions for all loaded PDFs
Returns: List of texts that have been marked for redaction in each PDF
Examples:
# List redactions for a specific PDF
List applied redactions for /path/to/document.pdf
# List redactions for all loaded PDFs
List all applied redactionsUse Cases:
Check what has already been redacted before adding more redactions
Verify redaction progress during a multi-step process
Avoid duplicate redaction attempts
Generate a report of what was redacted
7. close_pdf
Close a loaded PDF and free its resources. This also clears the redaction tracking for that PDF.
Parameters:
pdf_path(string): Path to the PDF file to close
Returns: Confirmation message
Workflow Example
Here's a typical workflow using this MCP server:
Load a PDF
Load the PDF at /Users/me/documents/sensitive.pdfReview the content The tool will return the full text content, which you can review to identify sensitive information.
Redact sensitive text (batch mode - recommended)
Redact ["Social Security Number", "123-45-6789", "John Doe", "jane.smith@email.com"] in /Users/me/documents/sensitive.pdfPro tip: Redacting multiple texts at once is much faster than calling the tool multiple times.
Check what has been redacted (optional)
List applied redactions for /Users/me/documents/sensitive.pdfThis shows you which texts have already been marked for redaction.
Add more redactions if needed
Redact ["Additional Text", "Another Secret"] in /Users/me/documents/sensitive.pdfThe tool will skip any texts that were already redacted in step 3.
Redact specific areas (optional)
Redact the area from (50, 100) to (200, 120) on page 2 of /Users/me/documents/sensitive.pdfSave the redacted PDF
Save the redacted version of /Users/me/documents/sensitive.pdfThis will create
/Users/me/documents/sensitive_redacted.pdfClose the PDF (optional)
Close /Users/me/documents/sensitive.pdf
Technical Details
Performance Tips
Batch Redaction is Faster:
# ā Slower: Multiple individual calls
Redact ["John Doe"] in document.pdf
Redact ["123-45-6789"] in document.pdf
Redact ["jane@email.com"] in document.pdf
# ā
Faster: Single batch call
Redact ["John Doe", "123-45-6789", "jane@email.com"] in document.pdfWhy batch redaction is better:
Reduces tool invocation overhead
Scans the PDF only once
Applies all redactions in a single pass
Automatically prevents duplicate redactions
Provides a single summary of all operations
Best Practice: Collect all texts to redact first, then make one batch call.
Dependencies
FastMCP (>=2.12.0): Python framework for building MCP servers
PyMuPDF (>=1.24.0): PDF manipulation library (imported as
fitz)
Architecture
In-memory storage: Loaded PDFs are kept in memory for fast access during redaction operations
Redaction tracking: The server tracks which texts have been redacted to prevent duplicate work
Batch processing: Multiple texts can be redacted in a single tool call for improved performance
Lazy application: Redaction annotations are added but not applied until
save_redacted_pdfis calledError handling: Uses FastMCP's
ToolErrorfor proper error propagation to MCP clientsContext logging: All operations log to the MCP context for transparency
Limitations (Current Version)
Text-only redaction: This version focuses on text redaction. Image redaction is not yet implemented.
Memory usage: PDFs are kept in memory while loaded. Very large PDFs may consume significant memory.
Single session: The in-memory store is not persistent across server restarts.
Development
Running Tests
# Install development dependencies
uv pip install -e ".[dev]"
# Run tests (when implemented)
pytestCode Structure
redact_mcp/
āāā src/
ā āāā redact_mcp/
ā āāā __init__.py # Package initialization
ā āāā server.py # Main MCP server implementation
āāā pyproject.toml # Package configuration
āāā README.md # This fileLicense
Apache-2.0
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Acknowledgments
Available Tools
7 toolsclose_pdfA
Close a loaded PDF and free its resources.
Args: pdf_path: Path to the PDF file to close ctx: MCP context for logging
Returns: Confirmation message
Raises: ToolError: If the PDF is not loaded
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_path | Yes | Path to the PDF file to close |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that the tool frees resources and can raise a ToolError if the PDF is not loaded, which are useful behavioral traits. However, it lacks details on permissions, side effects, or rate limits that would be beneficial for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with the main purpose. The structured sections (Args, Returns, Raises) are clear, but the repetition of parameter info in 'Args' slightly reduces efficiency, though it remains concise overall.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (a simple close operation), no annotations, and the presence of an output schema, the description is fairly complete. It covers purpose, parameters, returns, and error conditions, though it could benefit from more behavioral context like resource management details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the 'pdf_path' parameter. The description repeats this information in the 'Args' section but does not add significant meaning beyond what the schema provides, such as format examples or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Close a loaded PDF') and resource ('free its resources'), distinguishing it from sibling tools like 'list_loaded_pdfs' or 'load_pdf'. It explicitly identifies what the tool does without being tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by specifying 'a loaded PDF' and mentioning the 'Raises' condition, which indicates when not to use it (if PDF is not loaded). However, it does not explicitly name alternatives or provide detailed exclusions beyond the error case.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_applied_redactionsA
List all redactions that have been applied to loaded PDF(s).
This tool shows which texts have been marked for redaction in each PDF, helping to avoid duplicate redactions and track what has already been processed.
Args: pdf_path: Optional path to a specific PDF. If not provided, lists all PDFs. ctx: MCP context for logging
Returns: List of applied redactions for the specified PDF(s)
Raises: ToolError: If a specific PDF path is provided but not loaded
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_path | No | Optional path to a specific PDF file. If not provided, lists redactions for all loaded PDFs |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses behavioral traits: it lists applied redactions, helps avoid duplicates, tracks processed items, and raises ToolError for unloaded PDFs. However, it doesn't mention performance aspects like rate limits or detailed error handling beyond ToolError.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core purpose, followed by benefits, args, returns, and raises sections. Every sentence earns its place: no fluff, efficiently structured with clear sections for different aspects of the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (1 parameter, no nested objects), no annotations, but with an output schema (so return values are documented elsewhere), the description is complete. It covers purpose, usage, parameters, returns, and error conditions adequately for a listing tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. The description adds value by explaining the optional nature of pdf_path ('If not provided, lists all PDFs') and the context parameter ('MCP context for logging'), which clarifies usage beyond the schema's technical details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and resource 'redactions that have been applied to loaded PDF(s)', specifying it shows which texts have been marked for redaction. It distinguishes from siblings like list_loaded_pdfs (which lists PDFs, not redactions) and redact_area/redact_text (which apply redactions, not list them).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use: 'helping to avoid duplicate redactions and track what has already been processed.' It implies when not to use (e.g., for applying redactions, use redact_area/redact_text instead) and provides context about loaded PDFs, though it doesn't name alternatives directly beyond the sibling context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_loaded_pdfsB
List all currently loaded PDF files.
Returns: List of loaded PDF file paths
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists files and returns paths, but doesn't cover critical aspects like whether it's read-only (implied but not stated), error handling (e.g., if no PDFs are loaded), performance characteristics, or format of the returned list. For a tool with zero annotation coverage, this leaves significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and well-structured: two sentences that state the action and the return value with zero waste. It's front-loaded with the core purpose, making it easy to scan and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, output schema exists), the description is minimally adequate. It explains what the tool does and what it returns, but lacks context about prerequisites (e.g., needing loaded PDFs) and behavioral details. With no annotations and an output schema, it meets basic needs but could be more informative for agent usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and schema description coverage is 100% (empty schema). The description adds no parameter information, which is appropriate here. Baseline for 0 parameters is 4, as there's nothing to document, and the description correctly focuses on output instead.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'List all currently loaded PDF files.' This specifies the verb ('List') and resource ('loaded PDF files'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_applied_redactions' or 'load_pdf', which would require mentioning it shows only loaded files (not redaction status or loading capability).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., that PDFs must be loaded first using 'load_pdf'), exclusions, or comparisons to siblings like 'list_applied_redactions'. The agent must infer usage from context alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
load_pdfA
Load a PDF file and make it available for redaction.
This tool loads a PDF file into memory and extracts its text content for review. The PDF remains loaded for subsequent redaction operations.
Args: pdf_path: Path to the PDF file to load ctx: MCP context for logging
Returns: The full text content of the PDF
Raises: ToolError: If the file doesn't exist or cannot be opened
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_path | Yes | Path to the PDF file to load |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes key behaviors: loads PDF into memory, extracts text content, and keeps it loaded for future operations. However, it lacks details on memory implications, performance characteristics, or error handling beyond the basic ToolError mention.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, args, returns, raises) and uses efficient sentences. However, the parameter explanation in the description slightly duplicates the schema, and the logging context mention could be more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (loading and extracting text), no annotations, and the presence of an output schema (which handles return values), the description is reasonably complete. It covers purpose, usage context, parameters, returns, and errors, though could benefit from more behavioral details like memory usage or format constraints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents the single parameter 'pdf_path'. The description repeats the parameter explanation but does not add meaningful semantics beyond what the schema provides, such as file format requirements or path resolution details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Load a PDF file') and its purpose ('make it available for redaction'), distinguishing it from sibling tools like 'list_loaded_pdfs' (which only lists) or 'redact_text' (which modifies). It explicitly mentions the resource (PDF file) and the outcome (extracts text content for review).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: to load a PDF for subsequent redaction operations. It implies usage by mentioning that the PDF remains loaded for later steps, but does not explicitly state when not to use it or name alternatives like 'list_loaded_pdfs' for checking already loaded files.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
redact_areaA
Redact a specific rectangular area on a PDF page.
This tool adds a redaction annotation for a specific rectangular area defined by coordinates. The redactions are not yet applied to the document - use save_redacted_pdf to apply and save.
Args: pdf_path: Path to the PDF file (must be already loaded) page_number: Page number to redact (1-indexed) x0: Left x coordinate of the rectangle y0: Top y coordinate of the rectangle x1: Right x coordinate of the rectangle y1: Bottom y coordinate of the rectangle fill_color: RGB color tuple (0-1 range) for the redaction box. Default is black. ctx: MCP context for logging
Returns: Confirmation message
Raises: ToolError: If the PDF is not loaded, page doesn't exist, or redaction fails
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_path | Yes | Path to the loaded PDF file | |
| page_number | Yes | Page number (1-indexed) | |
| x0 | Yes | Left x coordinate | |
| y0 | Yes | Top y coordinate | |
| x1 | Yes | Right x coordinate | |
| y1 | Yes | Bottom y coordinate | |
| fill_color | No | RGB color for redaction (values 0-1). Default is black (0,0,0) |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by explaining key behavioral traits: it's a preparatory step (redactions not applied yet), requires a loaded PDF, has specific error conditions (PDF not loaded, page doesn't exist), and returns a confirmation message. It doesn't cover rate limits or auth needs but provides substantial operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, behavior, parameters, returns, errors) and appropriately sized. The first sentence immediately states the core purpose. Some redundancy exists between parameter descriptions and schema, but overall it's efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (7 parameters, mutation operation) and no annotations, the description provides good coverage: explains purpose, behavior, parameters, returns, and error conditions. With an output schema present, it doesn't need to detail return values. It could mention sibling tools more explicitly but is largely complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. The description adds minimal value beyond the schema by briefly explaining coordinate parameters and the default fill_color, but doesn't provide additional semantic context like coordinate system details or practical usage examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('redact a specific rectangular area'), resource ('on a PDF page'), and distinguishes from siblings by noting redactions are not yet applied, differentiating from save_redacted_pdf. It provides a precise verb+resource combination.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool ('adds a redaction annotation') and when not to use it ('redactions are not yet applied - use save_redacted_pdf to apply and save'). It provides clear context but does not mention alternatives like redact_text or prerequisites beyond PDF loading.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
redact_textA
Redact specific texts in a loaded PDF.
This tool searches for all instances of the specified texts in the PDF and adds redaction annotations over them. The redactions are not yet applied to the document - use save_redacted_pdf to apply and save. Only texts that haven't been previously redacted will be processed.
Args: pdf_path: Path to the PDF file (must be already loaded) texts_to_redact: List of text strings to search for and redact fill_color: RGB color tuple (0-1 range) for the redaction box. Default is black. ctx: MCP context for logging
Returns: Summary of redaction operations
Raises: ToolError: If the PDF is not loaded or redaction fails
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_path | Yes | Path to the loaded PDF file | |
| texts_to_redact | Yes | List of text strings to search for and redact | |
| fill_color | No | RGB color for redaction (values 0-1). Default is black (0,0,0) |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: the redactions are annotations not yet applied, it only processes unredacted texts, requires a loaded PDF, and mentions error conditions (ToolError if PDF not loaded or redaction fails). It doesn't mention rate limits or authentication needs, but covers the essential operational behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and appropriately sized. It front-loads the core functionality in the first sentence, then provides operational details, prerequisites, and relationships to other tools. Every sentence earns its place with no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no annotations, but with output schema), the description is complete enough. It explains what the tool does, when to use it, behavioral constraints, parameter purposes, and error conditions. The existence of an output schema means the description doesn't need to detail return values, and it adequately covers the operational context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. The description adds minimal value beyond the schema: it clarifies that texts_to_redact searches for 'all instances' and that fill_color is for 'the redaction box,' but doesn't provide additional semantic context like text matching behavior (case sensitivity, partial matches) or color interpretation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('redact specific texts', 'searches for all instances', 'adds redaction annotations') and resources ('in a loaded PDF'). It distinguishes itself from siblings by focusing on text-based redaction versus area-based (redact_area) and specifying it's not the saving operation (save_redacted_pdf).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool: 'Only texts that haven't been previously redacted will be processed.' It also specifies when not to use it (for saving) by directing to 'use save_redacted_pdf to apply and save.' It clearly distinguishes from sibling tools like redact_area (text vs area) and save_redacted_pdf (annotation vs application).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_redacted_pdfA
Apply all redactions and save the redacted PDF.
This tool applies all pending redaction annotations to the PDF and saves it. By default, it saves to a new file with '_redacted' appended to the original filename.
Args: pdf_path: Path to the PDF file (must be already loaded) output_path: Optional custom output path. If not provided, saves as '_redacted.pdf' ctx: MCP context for logging
Returns: Path to the saved redacted PDF
Raises: ToolError: If the PDF is not loaded or save fails
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_path | Yes | Path to the loaded PDF file | |
| output_path | No | Optional output path. If not provided, appends '_redacted' to the original filename |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the mutation behavior ('apply all redactions and save'), default file naming convention, error conditions ('PDF not loaded or save fails'), and return value. However, it doesn't mention side effects like whether the original PDF is modified or if redactions are cleared after saving.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured and front-loaded: the first sentence states the core purpose, followed by elaboration, parameter details, return value, and error handling. Every sentence adds value with zero redundancy, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (applying redactions and saving), no annotations, but a complete input schema (100% coverage) and an output schema (implied by 'Returns'), the description is fully adequate. It covers purpose, usage, parameters, returns, and errors, leaving no gaps for the agent to understand and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. The description adds meaningful context beyond the schema: it clarifies that 'pdf_path' refers to an 'already loaded' PDF (implying a prerequisite), explains the default naming convention for 'output_path' in more detail, and mentions 'ctx' as a logging context (though not in the schema). This extra semantic value justifies a score above baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('apply all redactions and save') and resource ('the redacted PDF'), distinguishing it from siblings like 'redact_area' or 'redact_text' which only create redactions, and 'list_applied_redactions' which only lists them. The verb+resource combination is precise and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool ('apply all pending redaction annotations') and mentions prerequisites ('PDF must be already loaded'), but does not explicitly state when not to use it or name specific alternatives among the siblings. The context is helpful but lacks explicit exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct, well-defined purpose with no overlap. For example, load_pdf loads files, redact_text redacts text, redact_area redacts areas, save_redacted_pdf saves results, list_loaded_pdfs lists loaded files, list_applied_redactions tracks redactions, and close_pdf closes files. The descriptions clearly differentiate their functions.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., load_pdf, redact_text, save_redacted_pdf). This uniformity makes the tool set predictable and easy to understand, with no deviations in naming conventions.
With 7 tools, the count is well-scoped for a PDF redaction server. It covers the full lifecycle from loading and redacting to saving and cleanup, with each tool serving a necessary function without bloat or redundancy.
The tool set provides complete coverage for PDF redaction workflows. It includes loading (load_pdf), two redaction methods (redact_text and redact_area), saving (save_redacted_pdf), listing and tracking (list_loaded_pdfs and list_applied_redactions), and cleanup (close_pdf). No obvious gaps exist for the domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for detecting and redacting PII (Personally Identifiable Information) in PDF documents.
Detect and redact Norwegian PII (fodselsnummer, names, health data) in text and PDFs.
Convert and compress PDFs and images, redact personal data, and run text and data utilities.
Stateless PII redaction over MCP/REST. Free ā¤1000 words or $0.01/call; file upload supported.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and users to process documents through natural language, supporting PDF operations like text extraction, redaction, splitting, form filling, annotations, and content search.20561MIT
- AlicenseNot gradedqualityDmaintenanceDetects and replaces black redaction boxes in PDF documents, enabling AI assistants to modify redacted PDFs by writing over the boxes with custom text.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to redact PII from text, summarize redacted content, and manage custom redaction patterns across multiple languages.
- FlicenseNot gradedqualityCmaintenanceDetects whether sensitive data like emails, SSNs, and phone numbers survive in supposedly redacted PDFs, running entirely locally via WebAssembly.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/redact_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server