Skip to main content
Glama

Text Analysis & Cleanup Tools (Tanod)

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 (default: all).

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. 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"
      -  ]
      -}
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world behavior, and the description adds substantial extra context: quota (10 free calls per IP per UTC day), price, sub-second latency, and a privacy guarantee that text is never logged or stored. It also discloses detection rigor (RE2 patterns, every hit re-checked, Luhn, mod-97) and deliberate non-matches (prices, dates, order numbers), though it could say more about failure handling or oversized input.

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 sibling routing, then dense factual blocks on behavior, gaps, and pricing; nearly every sentence carries information. It is close to run-on, and the pricing/docs tail could be trimmed, but nothing is filler.

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 stateless text-transformation tool with an output schema, full parameter coverage, and rich annotations, the description supplies everything an agent needs: entity coverage, exclusions, quota, cost, latency, and privacy posture. Return-value detail is redundant but harmless given the output schema exists.

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 still adds real value by explaining that masking yields tags, same-length stars, or a short hash and by constraining phone detection to North American or trunk-0 formats unless the + code is present. It largely restates the mask modes already documented in the schema, keeping this below a 5.

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?

"Redact PII from text" is a specific verb+resource, immediately followed by an enumerated entity list (emails, phones, cards, IBANs, SSNs, IPs, crypto addresses) and an explicit sibling contrast with check_text_for_secrets. An agent can distinguish this from pdf_redact or pseudonymize_pii without opening a 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?

It explicitly routes secrets/tokens to check_text_for_secrets and discloses scope limits ("Person names and street addresses are not detected") plus input-format prerequisites for national phone numbers. When-to-use, when-not, and the named alternative are all stated.

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.