Skip to main content
Glama
scrubguard-dev

scrubguard

Official

scrub_text

Sanitize text by scrubbing or reversibly tokenizing PII and secrets like emails, SSNs, credit cards, and API keys before sending prompts to LLMs.

Instructions

Scrub or reversibly tokenize PII (emails, SSNs, Luhn-verified credit cards, IBANs, phones, IPv4) and leaked API keys/secrets from text.

Input Schema

NameRequiredDescriptionDefault
modeNotokenize ([EMAIL_1] + reversible vault), redact, or masktokenize
textYesRaw text or prompt to sanitize
typesNoOptional whitelist of detector types

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that tokenize mode is reversible via a vault and that credit cards are Luhn-verified (implying false-positive avoidance), but says nothing about return shape, whether the original is preserved, ordering/idempotency, or performance on large inputs.

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 dense sentence that front-loads the verb and enumerates exactly which entity classes are covered. Nothing is redundant or padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should convey what comes back (sanitized text alone, or findings/counts, and where the vault token references go). For a low-complexity 3-param transform this is adequate but leaves the result contract undefined.

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 three parameters and the mode enum. The description only adds 'reversibly' to the tokenize mode, which the schema does not say; otherwise it adds no semantics beyond the structured fields. Baseline 3 applies.

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?

Specific verb ('scrub or reversibly tokenize') plus an explicit resource list (emails, SSNs, Luhn-verified cards, IBANs, phones, IPv4, secrets). The phrase 'from text' implicitly distinguishes it from scrub_json, but no sibling is named, so the differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No statement of when to pick this tool over scrub_json or rehydrate_text, and no guidance on choosing between tokenize/redact/mask beyond the enum's parenthetical. 'Reversibly tokenize' hints that a rehydration path exists but never points at rehydrate_text.

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

Deploy Server

Other Tools