Skip to main content
Glama
dambuchs

redact-pdf-mcp

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

redact_pdf_and_wait
Destructive

Permanently remove PII from PDFs, photos, and screenshots by uploading the file, running OCR-based detection, and waiting for the completed redacted PDF.

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.

To anonymize or pseudonymize a document while keeping it readable (who did what stays clear, e.g. before an AI works on it or before sending it to an expert), pass mode "pseudonymize": every entity becomes a consistent tag like [Person 1], you get the tag -> original table as a file, and the result includes document_text, the pseudonymized document as text, so you can work on it without reading the PDF. Afterwards, restore_names puts the real names back into a file you wrote, without showing them to you.

PRIVACY: when the user wants the document anonymized, pseudonymized or kept away from the AI, do NOT open, Read, cat, preview or summarize the original file before calling this tool: pass its path and nothing else. Reading it first puts the personal data into this conversation and defeats the purpose. The same goes for the correspondence CSV and any "-restored" file: they contain the real names, so never read them either.

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

NameRequiredDescriptionDefault
modeNo"redact" (default) draws black boxes. "pseudonymize" replaces each person, organization, address, email, phone number, date, IBAN and card number with a consistent tag such as [Person 1] or [Org 2] (spelled in the document's language, e.g. [Personne 1] in French) — the same tag on every page and, as a rule, for every variant of a name ("Anna Keller", "Ms Keller", "A. Keller" become [Person 1]; a bare surname shared by two people goes to the one mentioned last, and the user can merge or split tags in the Studio) — so the document stays readable for a colleague or another AI while the names are gone. The text is still removed from the file, not covered. With pseudonymize, redact_pdf_and_wait also returns the tag -> original correspondence table (CSV; on the remote server inline, which puts the original names into this conversation); keep it with the user, it re-identifies the document. Other categories (national IDs, custom terms) stay black.
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, and do not open the file yourself first when the user wants its personal data kept out of the conversation.
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.3.1
    • changedInput schema / properties / file_path / description
      Previous 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."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, and do not open the file yourself first when the user wants its personal data kept out of the conversation."
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "\"redact\" (default) draws black boxes. \"pseudonymize\" replaces each person, organization, address, email, phone number, date, IBAN and card number with a consistent tag such as [Person 1] or [Org 2] (spelled in the document's language, e.g. [Personne 1] in French) — the same tag on every page and, as a rule, for every variant of a name (\"Anna Keller\", \"Ms Keller\", \"A. Keller\" become [Person 1]; a bare surname shared by two people goes to the one mentioned last, and the user can merge or split tags in the Studio) — so the document stays readable for a colleague or another AI while the names are gone. The text is still removed from the file, not covered. With pseudonymize, redact_pdf_and_wait also returns the tag -> original correspondence table (CSV; on the remote server inline, which puts the original names into this conversation); keep it with the user, it re-identifies the document. Other categories (national IDs, custom terms) stay black.",
      +  "enum": [
      +    "redact",
      +    "pseudonymize"
      +  ],
      +  "type": "string"
      +}
  2. 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."
  3. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and openWorldHint=true, but the description supplies the substance: text is deleted rather than covered, OCR for scans, 100+ languages, EU/CH Azure processing, encryption, no model training, original deleted after processing, 10-60s blocking behavior, and timeout/state semantics. That is far more than the annotations convey.

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?

Front-loaded with the core action and the irreversible-redaction claim, then usage, then a distinct PRIVACY block. It is long and repeats the 'do not convert images to PDF' instruction already in the file_path schema, so a few sentences could be trimmed.

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 9-parameter, destructive, network-dependent tool with no output schema, the description covers everything an agent needs: required auth and the no-key fallback, blocking duration, timeout recovery, output location, and the privacy constraint on reading inputs or correspondence files.

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 baseline is 3; the description still adds value by explaining the pseudonymize workflow end-to-end (tag consistency, correspondence CSV, document_text output) and the restore_names hand-off, which the schema only partly covers. It does not add much on retention, output_path or the term lists, keeping it below 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?

Opens with a specific verb+resource+scope: 'Redact a PDF, photo or screenshot and wait for the finished file', and explicitly positions itself as the one-call entry point ('START HERE') versus siblings like redact_pdf, download_redacted and get_job_status. An agent can distinguish it from every sibling without opening a schema.

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?

Explicit when-to-use ('whenever someone wants PII ... removed before sharing, filing, publishing'), explicit alternative routing ('poll get_job_status rather than re-uploading', 'call try_demo with the user's file first' when no key), and a workflow hand-off to restore_names for the pseudonymize round-trip. It also states a when-not-to-do-something rule (do not read the file first in privacy cases).

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