Skip to main content
Glama
@writerslogic/ai-agents-mcp

@writerslogic/ai-agents-mcp

Official

redact_text

Redacts selected personal data from text at configurable levels, then rescans the output to verify no detected identifiers remain.

Instructions

Selective PII redaction with a self-check. Redacts personal data from text at the level you choose and proves the output is clean by scanning it again. Pick a level: 1 government identifiers (SSN, ITIN, EIN, UK NINO, Canadian SIN, driver's license, passport), 2 adds dates of birth, 3 adds street addresses and phone numbers, 4 adds person names and email addresses. Then switch single categories on or off with include and exclude, or name the exact set with categories; extras are credit cards, IBANs, routing and account numbers, IP addresses, URLs, every date, and organizations. minDigitRun redacts any run of that many digits, terms redacts words you list (business names, project names), and keep protects strings such as your own email address. Detectors use checksums and structure rules (Luhn, ABA, mod-97, SSN and EIN rules) so ordinary numbers are not swallowed, and every later mention of a redacted value is redacted too. Replacements are labels like [REDACTED:SSN], one generic marker, numbered tokens like [PERSON_2] that stay consistent, or labels that keep the last four characters. The response lists category, position and confidence for each redaction and never repeats the original values. The engine rescans its own output and returns an error (payment released) rather than a result that still contains a detected value. Names and organizations are heuristic; set useModel to add a model pass for names, organizations and addresses, which sends the text to the configured language-model provider. Text only, up to 1,000,000 characters (the request body may be up to 4 MB of UTF-8); nothing is stored and no digest of the input is returned.

Cost: 0.05 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Input Schema

NameRequiredDescriptionDefault
keepNoStrings that must never be redacted, such as your own email address or company name. Case-insensitive, whole match.
textYesThe document text to redact (plain text, Markdown, CSV, JSON or HTML source).
levelNoCumulative preset, default 1. 1: government identifiers (SSN, ITIN, EIN, UK NINO, Canadian SIN, driver's license, passport); 2: level 1 plus dates of birth; 3: level 2 plus street addresses and phone numbers; 4: level 3 plus person names and email addresses.
styleNolabel (default): [REDACTED:SSN]. generic: [REDACTED]. numbered: [PERSON_1], same value same number. last4: [REDACTED:SSN:*6789] for numeric identifiers; this discloses the last four characters.
termsNoWords or phrases to redact wherever they appear (business names, project names, people you already know). Case-insensitive.
excludeNoCategories to remove from the level preset.
includeNoCategories to add to the level preset.
useModelNoAdd a language-model pass for names, organizations and addresses (when those categories are on). Sends the text, up to 60000 characters, to the configured model provider. Default false.
categoriesNoExact set of categories to redact; replaces the level preset when given.
minDigitRunNoAlso redact every run of at least this many digits (spaces, dots and hyphens between digits count as part of the run). This is the number of digits, not the numeric value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnly=false, openWorld=true, non-idempotent, non-destructive; the description adds far more: a 0.05 USDC x402 charge per call with the payment conditions, that useModel ships text to an external language-model provider, that nothing is stored and no input digest is returned, the 1,000,000-character/4 MB limits, and that the engine rescans output and errors (with payment released) instead of returning tainted text. That is exactly the side-effect and data-handling context an agent needs and cannot get from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with purpose and every sentence is substantive, but it arrives as one dense wall of prose with no line breaks or bullets, and several clauses duplicate the schema's level and style enumerations. Given ten parameters and a pricing caveat, length is defensible, yet the lack of structure and the repeated schema content cost it.

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 ten-parameter tool with no output schema, this is unusually complete: it describes the response shape (category, position, confidence per redaction, originals never echoed), the failure mode, the cost mechanism, and the data-retention stance. An agent could invoke it correctly and anticipate results without further information.

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 the schema already documents all ten parameters including the level ladder and enum values, making 3 the baseline. The description mostly restates that content (level definitions appear nearly verbatim in both places) and adds value only through behavioral notes such as consistent later-mention redaction and checksum-based detectors. Nothing new is said about the individual parameters' syntax or interaction beyond the categories-replaces-level hint.

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 opens with a specific verb and resource ("Selective PII redaction ... Redacts personal data from text") and immediately scopes it ("at the level you choose"). The level ladder (1-4) plus the extras list makes the tool's exact capability envelope unambiguous, and no sibling tool in the list overlaps with it.

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 explicitly tells the agent how to choose between the three mutually exclusive selection mechanisms: presets via level, deltas via include/exclude, and "name the exact set with categories" — plus it flags that categories "replaces the level preset." It also notes useModel is opt-in and only relevant "when those categories are on." What's missing is any when-not-to-use or size/model caveat beyond the raw character cap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.