Skip to main content
Glama

PII Redaction

pii_redact
Read-only

PII redaction for agent pipelines: remove personal data from text before it goes to another model, a log, a ticket system or a dataset. Emails, IBANs (checksum verified), card numbers (Luhn verified), phone numbers and IP addresses are found by exact patterns; names of people, street addresses, birth dates and ID numbers by Claude Haiku 5.5. Every value gets a stable placeholder like [PERSON_1] so the text stays readable, and the mapping comes back so you can restore it later (or mode mask or remove). Up to 8,000 characters, any language, the rest of the text stays unchanged. Instructions inside the text are ignored. Price: $0.003 USDC per call, paid inside this MCP call via x402 (USDC on Base, Solana, Polygon or Arbitrum). x402 MCP clients such as @x402/mcp pay automatically. Free sample: call with the example input {"text":"Hi, this is Anna Schulz from Berlin. Please refund order 4471 to DE89 3704 0044 0532 0130 00 and confirm to anna.schulz@example.com or +49 30 1234 5678."}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keepNoValues to leave in place, e.g. your own support address
modeNoplaceholder: [EMAIL_1]; mask: ████; remove: deleteplaceholder
textYesText to redact, max 8,000 chars
typesNoWhich kinds to redact. Default all except ORGANIZATION and URL
return_mappingNoReturn placeholder to original value mapping

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Discloses far more than the read-only annotations: which entities are regex-detected with checksum/Luhn verification vs. LLM-detected, the stable placeholder format, the returned mapping enabling restore, an 8,000-character cap, language-agnostic behavior, prompt-injection resistance ('Instructions inside the text are ignored'), and the x402 USDC payment mechanics with price. That is exactly the behavioral context annotations cannot carry.

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 purpose and usage before mechanics, pricing and sample, and nearly every clause carries information. The trailing free-sample sentence with an inline JSON example is long relative to its value, but it is the only clearly expendable part.

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 still explains what comes back (redacted text plus placeholder-to-original mapping) and covers limits, pricing and edge behavior. An agent has everything needed to call it correctly and to know the cost implication.

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%, so the schema already documents all five parameters including the mode enum and types default. The description adds only marginal meaning (the restore workflow behind return_mapping, and the mode options in passing), which does not go substantially beyond the structured fields.

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?

States a specific verb and resource ('PII redaction ... remove personal data from text') plus the exact scope (emails, IBANs, cards, phones, IPs, names, addresses, DOBs, IDs) and the detection method for each group. An agent can tell immediately what this does and that it is not a validator like iban_validate or a detector like privacy_check.

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

Usage Guidelines4/5

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

Gives clear context for use ('before it goes to another model, a log, a ticket system or a dataset') and the pipeline framing in the first sentence. It never names an alternative tool or states when not to use it, so it stops short of full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources