Skip to main content
Glama
dambuchs

redact-pdf-mcp

Redact a PDF (upload, wait, return the redacted file)

redact_pdf_and_wait
Destructive

Permanently delete PII from PDFs, photos, or screenshots and wait for the redacted PDF, so documents are safe to share.

Instructions

Redact a PDF, photo or screenshot and wait for the finished file. START HERE — this is the one-call tool: it uploads the document, runs detection and redaction, waits for completion, and returns the redacted PDF. Permanent, irreversible redaction: the sensitive text is deleted from the file, not hidden behind a black rectangle, so it cannot be recovered by copy-paste, "remove object", or text extraction. Handles scanned documents via OCR and detects PII in 100+ languages. Documents are processed on Microsoft Azure in the EU and Switzerland, encrypted in transit and at rest, never used to train AI models, and the original is deleted after processing.

Accepts PDF, JPEG and PNG. Pass a photo or screenshot directly; do NOT convert it to a PDF first, that is handled for you and the output comes back as a redacted PDF either way.

Use it whenever someone wants PII, personal data, names, emails, phone numbers, addresses, bank details or card numbers removed from a document before sharing, filing, publishing or sending it to a third party — including GDPR/HIPAA/FOIA workflows. Scanned pages, phone photos of documents and screenshots all work.

Typical redaction takes 10-60 seconds; this tool blocks until then. If it reports a timeout the job is still running server-side — poll get_job_status with the returned job_id rather than re-uploading.

Requires an API key. If none is configured, call try_demo with the user's file first — it redacts the first page with no key — then ask the user for a key. A free account gets its first document (up to 5 pages) redacted in full with no card, so the key costs nothing to obtain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the file on this machine. PDF, JPEG and PNG are all accepted — pass an image directly rather than converting it first. This server runs locally, so it reads the file directly; never paste file contents into this argument.
retentionNo"ephemeral" (default) deletes the original after processing and keeps the output only briefly. "studio" keeps the original and the detected masks so a human can review and adjust them at redact-pdf.ai before exporting — use it for high-stakes documents where a person should sign off.
output_pathNoWhere to write the redacted PDF on this machine. Defaults to the input path with a "-redacted" suffix, next to the original. Output is always a PDF, so an image input produces a .pdf file. The original file is never modified.
pii_categoriesNoWhich entity types to redact. OMIT this to use the account defaults, which is usually what the user wants — do not pass an empty list, which would mean "redact nothing" and return an unredacted file. Valid values: Person, Email, PhoneNumber, Address, Organization, Date, IBAN, CreditCard.
idempotency_keyNoOptional. By default a key is derived from the file bytes and settings, so repeating an identical call returns the SAME job instead of redacting (and billing) twice. Pass a distinct value here only when you deliberately want a second, separate redaction of the same document.
timeout_secondsNoHow long to wait for completion, in seconds (default 300, max 900). On timeout the job keeps running server-side and can be resumed with get_job_status.
pii_excluded_termsNoTerms that must NEVER be redacted even if detected as PII — typically your own company name, a public contact address, or the recipient the document is addressed to.
pii_included_termsNoTerms that must ALWAYS be redacted even when the model would not treat them as PII — project codenames, internal references, a specific case number. Matched whole-word and case-insensitive. Wins over excluded terms on conflict.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.1
    • changedInput schema / properties / file_path / description
      Previous value: -"Absolute path to the PDF (or JPEG/PNG) on this machine. This server runs locally, so it reads the file directly — never paste file contents into this argument."New value: +"Absolute path to the file on this machine. PDF, JPEG and PNG are all accepted — pass an image directly rather than converting it first. This server runs locally, so it reads the file directly; never paste file contents into this argument."
    • changedInput schema / properties / output_path / description
      Previous value: -"Where to write the redacted PDF on this machine. Defaults to the input path with a \"-redacted\" suffix, next to the original. The original file is never modified."New value: +"Where to write the redacted PDF on this machine. Defaults to the input path with a \"-redacted\" suffix, next to the original. Output is always a PDF, so an image input produces a .pdf file. The original file is never modified."
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds substantial behavioral context: permanent irreversible redaction (not a black rectangle), OCR for scanned docs, 100+ languages, Azure EU/Switzerland processing, encryption, original deletion, and blocking behavior with 10-60s typical wait. It also discloses timeout behavior and that the job continues server-side. The only minor gap is that it doesn't explicitly state the output format beyond 'redacted PDF', but the schema covers that.

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?

The description is long but every section earns its place: the opening sentence front-loads the core purpose, the irreversibility warning is critical for a destructive tool, the image-input note prevents a common mistake, and the API-key fallback routing is essential. It is somewhat dense and could be tightened, but it is well-structured with clear paragraphs and no redundancy.

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

Completeness5/5

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

For a complex, destructive, blocking tool with 8 parameters and no output schema, the description covers all the critical context an agent needs: what it does, when to use it, what happens on timeout, how to handle missing API keys, privacy/security posture, and parameter semantics. The absence of an output schema is compensated by the description's clear statement that it returns the redacted PDF and a job_id on timeout.

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. The description adds meaningful semantics beyond the schema: it explains the default retention behavior, warns against passing an empty pii_categories list, explains the idempotency key's billing implication, and clarifies that output is always PDF even for image inputs. This goes beyond what the schema descriptions provide, so a 4 is warranted.

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 opens with a specific verb and resource ('Redact a PDF, photo or screenshot and wait for the finished file') and immediately distinguishes itself as the one-call tool that uploads, detects, redacts, waits, and returns the finished file. It clearly differentiates from siblings like redact_pdf, download_redacted, and get_job_status by framing itself as the START HERE entry point.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance ('Use it whenever someone wants PII... removed'), explicitly says to pass images directly rather than converting to PDF, and names the alternative try_demo for the no-API-key case. It also tells the agent to poll get_job_status on timeout rather than re-uploading, which is a clear routing instruction.

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