Skip to main content
Glama
dambuchs

redact-pdf-mcp

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

redact_pdf_and_wait
Destructive

Upload a PDF, permanently remove personal data (PII) from the text, and get the finished redacted file after processing.

Instructions

Redact a PDF 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 PDF 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 PDFs via OCR and detects PII in 100+ languages. Documents are processed on EU/Swiss infrastructure.

Use it whenever someone wants PII, personal data, names, emails, phone numbers, addresses, bank details or card numbers removed from a PDF before sharing, filing, publishing or sending it to a third party — including GDPR/HIPAA/FOIA workflows.

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 first to confirm the service works, then ask the user for a key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute 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.
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. 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.
Behavior5/5

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

Annotations already indicate destructive behavior, and the description strongly reinforces it by stating redaction is 'permanent, irreversible' and that text is deleted, not hidden. It also adds non-obvious behavior: OCR on scanned PDFs, 100+ languages, blocking for 10-60 seconds, server-side continuation on timeout, and EU/Swiss infrastructure. No contradiction with annotations.

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 front-loaded with the core behavior and 'START HERE' marker, then covers use cases, timeout behavior, and API key requirements in tight paragraphs. It is slightly longer than the minimum needed, but every section earns its place and the structure makes it scannable.

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?

With no output schema, the description compensates by stating the return values (redacted PDF, job_id on timeout), explaining blocking behavior, mentioning prerequisites (API key), and directing to sibling tools for follow-up. For an 8-parameter, destructive, blocking tool this is fully adequate.

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 the parameter descriptions already explain semantics well, including guidance like 'do not pass an empty list' for pii_categories and defaults for output_path. The main description adds no significant parameter-level meaning beyond what the schema provides, so a baseline 3 is appropriate.

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 uses a specific verb ('Redact'), a clear resource ('PDF'), and explains the full one-call flow: upload, detect, redact, wait, return. 'START HERE' and 'one-call tool' explicitly differentiate it from the multi-step sibling tools like redact_pdf and get_job_status.

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?

It states when to use the tool ('whenever someone wants PII... removed from a PDF'), gives concrete alternatives for edge cases (poll get_job_status instead of re-uploading on timeout, call try_demo if no API key), and frames it as the starting point. This is explicit usage guidance with named fallback tools.

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/dambuchs/redact-pdf-mcp'

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