Skip to main content
Glama

pii_redact

Find and redact personal data and secrets in text before an agent stores, logs or forwards it: emails, phone numbers, US SSNs, payment cards (Luhn-checked), IBANs (checksum), IPs, crypto addresses, dates of birth, street addresses, API keys, tokens and private keys, plus person names and free-form addresses from an LLM pass. Returns the redacted text ([EMAIL] labels or masks), each entity with its position, and counts. Costs $0.005 USDC on Base via x402.

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

Input Schema

NameRequiredDescriptionDefault
textYesThe text to scan, up to 50,000 characters
modelNoAlso find names and free-form addresses with the LLM (default true)
styleNolabel: [EMAIL] (default); mask: ****, keeping a card's last 4
typesNoComma list to limit the search (email, phone, us_ssn, credit_card, iban, ip_address, crypto_address, date_of_birth, street_address, secret, person_name, postal_address)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses detection methods (Luhn, checksum, LLM pass), return content, output styles, and a $0.005 USDC x402 cost. It stops short of stating data-retention behavior or whether the input text is stored after processing.

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 front-loaded, dense, and free of filler: purpose, entity coverage, return format, and cost each appear once. The first sentence is long because of the entity enumeration, but the structure remains clear.

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?

For a 4-parameter tool with no output schema, the description explains what is returned (redacted text, entity positions, counts) and discloses the payment cost. It is nearly complete, with only minor gaps around failure behavior and input handling after the call.

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%, so the schema already documents all four parameters. The description reinforces a few semantics (LLM pass for names/addresses, label versus mask output) but does not add substantial meaning beyond the structured 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?

The description gives a specific verb and resource (find and redact personal data and secrets in text) and enumerates the exact entity classes covered. An agent can immediately tell this is a PII/secret redaction tool, with no ambiguity versus the crypto and AI siblings.

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 states the operational context: use before an agent stores, logs, or forwards text. It does not name alternatives or exclusions, but there is no obvious sibling alternative to route to.

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