Skip to main content
Glama

Deterministic PII redact (email/phone/SSN/card/IP/IBAN/routing/secrets)

text_pii_redact
Read-onlyIdempotent

Deterministic PII detect-and-redact for untrusted text (tickets, chat logs, LLM prompts) before storage or model input. Finds email, phone, US SSN, credit card (Luhn), IP, IBAN (mod-97), US ABA routing, and secret prefixes (sk-, ghp_, AKIA…). Checksum-validated; no LLM/NER. Returns findings with offsets, placeholders, redacted copy and countsByType. Optional types= filter. POST JSON {text} max 32 KB (GET ?text= max 2,000). Errors: 400 bad input. PAID: $0.001 USDC per call on Base via x402 (MCP transport: retry with params._meta["x402/payment"]). Same tool over plain HTTP: POST /v1/text/pii-redact.

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": "text_pii_redact"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
typesNooptional comma list: email,phone,ssn,credit_card,ip,iban,routing,secret

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnly and idempotent annotations, the description discloses important behavior: checksum validation, no LLM/NER, output fields, input-size caps, and specific error behavior. It also explains the paid x402 flow and the equivalent plain-HTTP route, which an agent would otherwise have to discover through failure.

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?

The description is dense but front-loaded with the core purpose, detection categories, and return shape. Later operational details about size limits, payment, and HTTP routing are useful but make the passage feel compressed. No sentence is clearly disposable.

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 two-parameter mutation-free text processor with no output schema, the definition is unusually complete. It covers input formats, return fields, errors, size limits, payment requirements, and the HTTP equivalent. An agent has enough information to invoke it and handle the main failure mode.

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 only 50%, but the description adds useful meaning for both parameters: it expands the allowed possible types and restates the input-size constraint. The types parameter remains a free-form comma list rather than an enum, and the description does not clarify matching, case sensitivity, or offset semantics in detail.

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?

The description uses a specific verb and resource: deterministic PII detect-and-redact for untrusted text. It names the entity classes and the input contexts, so an agent can tell what the tool does without opening the schema. It does not explicitly differentiate itself from neighboring tools, though no similarly scoped alternative is named.

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?

It clearly frames when the tool is useful: on tickets, chat logs, and LLM prompts before storage or model input. It also documents the optional types filter and input-size limits. It does not state when not to use it or name an alternative for related tasks such as injection scanning.

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