Skip to main content
Glama
dambuchs

redact-pdf-mcp

Try redaction with no API key (first page of a real file, or a sample)

try_demo

Test PDF redaction with no API key on the first page of your own document, returning detected PII categories and a redacted link, or run a built-in sample to confirm connectivity.

Instructions

Try redaction with no API key. Two modes:

  1. With a file: redacts the FIRST PAGE of the user's own PDF, photo or screenshot (5 MB max) and returns which categories of personal data were found on it, plus a link to the redacted page that stays valid for 14 days. Nothing is stored beyond that page and the original is deleted after processing. Use this to show a user real output on their own document before they sign up. Only the first page is redacted; for the whole document use redact_pdf_and_wait with a key.

  2. Without a file: runs the built-in synthetic-PII sample to confirm connectivity. Never touches user data.

With a file, pass mode "pseudonymize" to show consistent tags ([Person 1], [Org 1]) instead of black boxes; the tags drawn are listed in the result. The built-in sample (no file) is always shown in redact mode.

Both cost nothing. When the user wants the rest of the document, tell them a free account gets its first document (up to 5 pages) redacted in full with no card, then ask for the key.

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_urlNoPublic http(s) URL of the file to redact. PDF, JPEG and PNG are all accepted — no need to convert an image first. The server downloads it, redacts it, and does not keep it.
filenameNoFilename for the document, including its extension (e.g. "contract.pdf", "receipt.png"). Determines how the file is interpreted.
file_pathNoAbsolute 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.
file_base64NoThe document encoded as base64. PDF, JPEG and PNG are all accepted. Use file_url instead when you have one — base64 is much larger to pass around.
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.
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. Changed8 schema fields changedv0.2.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / file_base64
      Added value: +{
      +  "description": "The document encoded as base64. PDF, JPEG and PNG are all accepted. Use file_url instead when you have one — base64 is much larger to pass around.",
      +  "type": "string"
      +}
    • addedInput schema / properties / file_path
      Added value: +{
      +  "description": "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.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / file_url
      Added value: +{
      +  "description": "Public http(s) URL of the file to redact. PDF, JPEG and PNG are all accepted — no need to convert an image first. The server downloads it, redacts it, and does not keep it.",
      +  "format": "uri",
      +  "type": "string"
      +}
    • addedInput schema / properties / filename
      Added value: +{
      +  "description": "Filename for the document, including its extension (e.g. \"contract.pdf\", \"receipt.png\"). Determines how the file is interpreted.",
      +  "type": "string"
      +}
    • addedInput schema / properties / pii_categories
      Added value: +{
      +  "description": "Which 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.",
      +  "items": {
      +    "enum": [
      +      "Person",
      +      "Email",
      +      "PhoneNumber",
      +      "Address",
      +      "Organization",
      +      "Date",
      +      "IBAN",
      +      "CreditCard"
      +    ],
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / pii_excluded_terms
      Added value: +{
      +  "description": "Terms 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.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / pii_included_terms
      Added value: +{
      +  "description": "Terms 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.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

With annotations present the bar is lower, but this adds substantial context beyond them: 5 MB cap, first-page-only scope, 14-day link lifetime, deletion of the original after processing, no retained storage, and that the no-file sample never touches user data. It does not address auth/permission nuance for a keyless endpoint, but the safety-relevant lifecycle facts are all disclosed.

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 keyless premise and then cleanly split into numbered modes, which is exactly the structure an agent needs. Slight redundancy in restating pseudonymize behavior that the mode parameter description already covers in depth, and the closing upgrade pitch is promotional rather than functional, but nothing is confusing.

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?

There is no output schema, and the description compensates by describing what comes back: the categories of personal data found, a 14-day link to the redacted page, and the tag list for pseudonymize. Combined with full schema coverage and explicit cost ('both cost nothing'), an agent has everything needed to call and interpret results.

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 earns above baseline by explaining the mode semantics that cut across the schema — that pseudonymize must be explicitly passed with a file, that the built-in sample is always redact mode, and that tags used are reported in the result. It does not disambiguate the four interchangeable file-input parameters (file_url vs file_path vs file_base64 vs filename), which matters for an 8-parameter tool, though the schema covers it.

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 and scope: keyless trial redaction of the first page of a file or a synthetic sample. It immediately distinguishes itself from redact_pdf_and_wait by naming that sibling and the condition ('with a key') that selects it, so an agent can route correctly without opening either 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?

Explicitly states when to use this tool ('to show a user real output on their own document before they sign up'), when not to ('for the whole document use redact_pdf_and_wait with a key'), and how the two modes are selected (file present vs absent). It also prescribes follow-up behavior: when the user wants the rest, say a free account covers 5 pages and ask for the key.

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