Skip to main content
Glama

text_redact

text_redact

Detects and redacts personal data in text before it is logged, stored or sent to a model: emails, phones, US SSNs, payment cards (Luhn-checked), IBANs (checksum-checked), IPv4/IPv6, URLs, dates of birth, street addresses, passport or ID numbers in context, and crypto wallet addresses. Returns the redacted text plus each finding with type, value and offsets. Modes: label ([EMAIL]), mask (****1234) or remove. Up to 200,000 characters per call; nothing leaves the server. Price: $0.003 USDC per call (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": "text_redact"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNolabel (default), mask or remove
textYesText to redact, up to 200000 characters
typesNoComma-separated subset of email,phone,ssn,credit_card,iban,ip,url,date_of_birth,address,passport,crypto_address (default all)
include_findingsNofalse to omit the findings array (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the single readOnlyHint=false annotation: it states the 200,000-character cap, the privacy guarantee that 'nothing leaves the server', which detectors are checksum-verified (Luhn for cards, checksum for IBANs), and that the call is metered at $0.003 USDC via x402. That cost and limit disclosure is exactly the operational context annotations don't carry; only reversal/idempotency behavior and error modes are left unstated.

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?

A single front-loaded paragraph that flows from what it detects, to what it returns, to output modes, to limits, privacy and price. The detector enumeration is long but each item carries real selection value, and no sentence 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?

With no output schema, the description correctly compensates by describing the return payload (redacted text plus findings with type, value and offsets). Combined with the size limit, mode list, privacy guarantee and pricing, an agent has everything needed to invoke this tool correctly on the first try.

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, but the description still adds meaning: it renders the abstract modes concretely as '[EMAIL]', '****1234' and removal, and echoes the 200k limit inline. It does not illustrate how 'passport or ID numbers in context' is detected, which is a nuance the schema cannot express.

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?

A specific verb+resource ('detects and redacts personal data in text') immediately qualified by the enumerated PII classes it recognizes, so an agent knows exactly which detector families are in scope. It is clearly distinguishable from sibling safety utilities such as guard_injection, which targets prompt injection rather than PII.

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?

The phrase 'before it is logged, stored or sent to a model' gives concrete trigger conditions for when to reach for this tool. What is missing is any explicit exclusion or named alternative (e.g., when to prefer a validation sibling like email_validate, or what to do with text exceeding the limit besides truncating).

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.