Skip to main content
Glama

Zero-PII & Secret Credential Redaction Engine

redact_sensitive_pii
Read-onlyIdempotent

Redacts emails, phone numbers, SSNs, credit cards, API keys, and crypto private keys from text before logging or external transmission to prevent personal data and credential leaks.

Instructions

Redacts emails, phone numbers, SSNs, credit cards, API keys, and crypto private keys from text before logging or external transmission. Use when stripping personal data or secret credentials from prompts, logs, or outbound messages; for neutralizing indirect prompt injections and invisible Unicode in inbound tool responses, use sanitize_tool_output_stream instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'text' ('redaction_style' defaults to 'typed_token'), supports '?demo=true' or L402 (25 sats), and returns HTTP 400 if invalid.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "redact_sensitive_pii"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesInput text containing potential PII or secret keys to redact.
redaction_styleNoPlaceholder format used for redacted spans; defaults to 'typed_token' when omitted.

Output Schema

NameRequiredDescriptionDefault
scrubbed_textYesSanitized text with all sensitive entities replaced by redaction tokens.
redactions_countYesTotal number of sensitive entities redacted.
zero_pii_certifiedYesTrue when post-scan verification confirms zero residual PII patterns.
categories_redactedYesTypes of sensitive data detected (e.g. 'EMAIL', 'SSN', 'PRIVATE_KEY').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.3

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, but the description adds substantial operational context beyond that: stateless edge call, max 32 KB payload, 60 RPM rate limit, payment options (?demo=true or L402 at 25 sats), and HTTP 400 on invalid 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 sentences, zero waste, and front-loaded with the core purpose and sibling distinction before operational limits. Every clause carries useful information.

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?

An output schema exists so return values need not be explained. The description covers size limits, rate limits, auth/payment paths, default behavior, and error handling, which is complete for an agent to call it correctly.

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 coverage is 100% and both parameters are already documented there, including the redaction_style enum and its default. The description mostly restates the default and text input, adding no syntax or format details beyond the schema.

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 the specific verb 'redacts' and enumerates the exact resource classes (emails, phone numbers, SSNs, credit cards, API keys, crypto private keys), and explicitly distinguishes itself from the sibling sanitize_tool_output_stream by naming the different use case.

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 says when to use it ('stripping personal data or secret credentials from prompts, logs, or outbound messages') and names the alternative tool plus the condition that selects it (neutralizing indirect prompt injections and invisible Unicode in inbound tool responses).

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

Deploy Server

Other Tools