Skip to main content
Glama

redact_pii

Read-onlyIdempotent

utilpeek: Redact PII from text: emails, phone numbers, card numbers, IBANs, SSNs, IPs and crypto addresses. For API keys and tokens use check_text_for_secrets. Returns the text with emails, phone numbers, payment cards (Luhn), IBANs (mod-97), US SSNs, IPv4 / IPv6, EVM / BTC addresses and secret URL query values replaced by a tag ([EMAIL]), same-length stars or a short hash, plus each entity's type, input offsets and replacement, and counts by type. RE2 patterns, every hit re-checked; prices, dates and order numbers are left alone. Person names and street addresses are not detected (see not_detected). National phone numbers: North American or trunk-0 formats only, elsewhere the + code is needed. Typically under 1 s. Price: USD 0.002. Free: 10 utilpeek calls per IP per UTC day. The submitted text is never logged or stored. Docs: https://tanod.dev/learn/pii-redaction-api-prices.html

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_pii"
  }
}

Input Schema

NameRequiredDescriptionDefault
maskNotag (default: [EMAIL], [PHONE], [CARD] ...), stars (the same number of *, so the length is kept) or hash ([EMAIL:8 hex of SHA-256 of the normalised value]: equal values get equal tags).tag
textYesThe text (at most 200,000 characters).
typesNoLimit detection to these types: email, phone, card, iban, ssn, ipv4, ipv6, crypto_address, url_secret, national_id (CPF, CNPJ, Aadhaar, NIF, NIE; opt-in). Default: all but national_id.

Output Schema

NameRequiredDescriptionDefault
maskNo
textNo
countNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
notesNo
typesNo
sourceNo
by_typeNo
entitiesNo
not_detectedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / types / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "enum": [
      -        "email",
      -        "phone",
      -        "card",
      -        "iban",
      -        "ssn",
      -        "ipv4",
      -        "ipv6",
      -        "crypto_address",
      -        "url_secret"
      -      ],
      -      "type": "string"
      -    },
      -    "maxItems": 9,
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "enum": [
      +        "email",
      +        "phone",
      +        "card",
      +        "iban",
      +        "ssn",
      +        "ipv4",
      +        "ipv6",
      +        "crypto_address",
      +        "url_secret",
      +        "national_id"
      +      ],
      +      "type": "string"
      +    },
      +    "maxItems": 10,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / types / description
      Previous value: -"Limit detection to these types: email, phone, card, iban, ssn, ipv4, ipv6, crypto_address, url_secret (default: all)."New value: +"Limit detection to these types: email, phone, card, iban, ssn, ipv4, ipv6, crypto_address, url_secret, national_id (CPF, CNPJ, Aadhaar, NIF, NIE; opt-in). Default: all but national_id."
  2. Changed9 schema fields changed
    • removedInput schema / properties / mask / title
      Removed value: -"Mask"
    • removedInput schema / properties / text / title
      Removed value: -"Text"
    • removedInput schema / properties / types / default
      Removed value: -null
    • removedInput schema / properties / types / title
      Removed value: -"Types"
    • removedInput schema / title
      Removed value: -"redact_piiArguments"
    • removedOutput schema / properties / by_type / additionalProperties
      Removed value: -{
      -  "type": [
      -    "integer",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / entities / items
      Removed value: -{
      -  "properties": {
      -    "end": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "replacement": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "start": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "type": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / not_detected / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / types / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses detection method (RE2 patterns, every hit re-checked), deliberate false-positive suppression (prices, dates, order numbers left alone), known blind spots via `not_detected`, latency (~1 s), pricing (USD 0.002), free-tier quota (10 calls per IP per UTC day), and the data-handling guarantee that text is never logged or stored. That is unusually complete behavioral context for a read-only tool.

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 the sibling handoff, then progressively finer caveats and cost/limits — good ordering. It is dense but nearly every clause carries decision-relevant information; the main redundancy is the entity list being effectively enumerated twice (once in the opening sentence, once in the returns sentence).

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?

For a 3-parameter text transformer with an output schema already covering return shape, the description still supplies cost, quota, latency, data-retention policy and detection gaps — everything an agent needs to call it correctly and to warn a user about limits.

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 three parameters are already documented in structured fields. The description restates the mask outputs ('[EMAIL]', same-length stars, short hash) and the opt-in nature of national_id, but adds no syntax or defaulting detail beyond the schema, so the baseline 3 applies.

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+resource ('Redact PII from text') and enumerates the entity classes covered, then explicitly distinguishes itself from the sibling check_text_for_secrets for API keys and tokens. An agent can select this over its nearest alternative 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?

Explicit routing guidance is given ('For API keys and tokens use check_text_for_secrets') plus negative scope: person names and street addresses are not detected, and national phone numbers need the + code unless North American/trunk-0. This tells the agent both when to use it and when its output will be incomplete.

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