Skip to main content
Glama

PII Shield

redact

Redact personal data (email, phone, cards, SA ID, SSN, IP, IBAN, names, custom terms) from text, replacing each value with a stable token like [EMAIL_1]. Call this before putting sensitive text into a prompt or context. NOTE: detection is automated and is not a guarantee; it can miss personal data. Review the output before relying on it.

Input Schema

NameRequiredDescriptionDefault
textYesThe text to redact.
rejectNoFinding ids (from a preview) to leave unredacted — a human said 'not PII here'.
previewNoDry run: return what WOULD be redacted (type, confidence, rationale) without changing the text or consuming quota.
detectorsNoOptional map of detector→bool to override defaults.
customTermsNoExtra literal terms to always mask (custom PII).
customPatternsNoCustom PII as regexes, e.g. {type:'EMPID', pattern:'EMP-\\d{5}'}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does meaningful work: it discloses that replacement is by stable token, that detection is automated and can miss PII, and that the caller should review output. It omits other behavioral facts an agent would want — whether tokens are reversible/consistent across calls, quota consumption, and side effects on input.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with what gets redacted and what the output looks like, followed by the when-to-use trigger and the accuracy caveat. No filler or repetition of the tool name.

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

Completeness4/5

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

Covers purpose, timing, and the crucial false-negative caveat for a six-parameter tool with no annotations and no output schema. The main remaining gap is return-value shape beyond token examples (e.g., whether mappings/confidence are returned) and any interaction between preview, reject, and quota.

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 all six parameters are already documented in the schema, including preview, reject, customTerms and customPatterns. The description only echoes the custom-terms category and the token format rather than explaining interactions such as using preview before reject or how detectors overrides behave. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (redact) plus the resource (personal data in text) and enumerates the categories handled (email, phone, cards, SA ID, SSN, IP, IBAN, names, custom terms), and even shows the output shape ([EMAIL_1]). It does not distinguish itself from siblings like redact_document or detect_pii, so an agent must infer that this one is for plain text rather than documents or detection-only.

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?

"Call this before putting sensitive text into a prompt or context" gives a concrete triggering condition. There is no explicit when-not guidance and no mention of when to pick detect_pii (detect only) or redact_document (documents) instead, which leaves sibling selection to inference.

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