Skip to main content
Glama

Safety Scrub

safety-scrub

Safety Scrub — Redact sensitive data from text before logging it or sending it to a model. Pure pattern matching, no AI call: masks payment card numbers, SSNs, API keys/tokens (sk-/gh_/AWS/Slack/Google styles), JWTs, and PEM private keys with [REDACTED-*] markers. Use whenever user-supplied or scraped text may carry credentials. Input: {text: string}. Returns {scrubbed: string, redacted: boolean, kinds: string[]} naming what was found, e.g. ['card','ssn']. Best-effort, not a guarantee. (1 MESH/call, a tool · safety)

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": {
      "input": "<input>"
    },
    "name": "safety-scrub"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesPayload for safety-scrub

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Adds substantive behavior beyond the annotations: no AI call, deterministic pattern matching, an explicit 'Best-effort, not a guarantee' limitation, the exact marker format ([REDACTED-*]), and a cost note (1 MESH/call). There is mild tension with the supplied hints (openWorldHint=true and readOnlyHint=false for a purely local text transform), but the description itself is honest about mechanism and limits.

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?

Front-loads the purpose and mechanism, then the when-to-use rule, then I/O contract, then the caveat. Sentences are dense but every one carries information an agent needs; the trailing cost/tag metadata is compact and informative.

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?

With no output schema, the description correctly supplies the return shape ({scrubbed, redacted, kinds}) and even an example of kinds values, plus the accuracy caveat. Only the alias-parameter precedence is left unexplained, which is a minor gap given it is documented in the schema.

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%, including the nested text/input/content fallback chain, so the schema already carries the parameter meaning. The description only restates 'Input: {text: string}' and never explains the alias fields or the 'read only if text is absent/falsy' precedence, adding no meaning beyond the 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?

Names a specific verb and resource (redact sensitive data from text) and enumerates exactly which patterns are masked: card numbers, SSNs, API keys/tokens in named vendor styles, JWTs, and PEM private keys. It also explicitly states the mechanism ('Pure pattern matching, no AI call'), which distinguishes it from any model-backed alternative an agent might otherwise reach for.

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?

Gives a clear positive trigger: 'Use whenever user-supplied or scraped text may carry credentials,' and a stated purpose context ('before logging it or sending it to a model'). It does not name a when-not condition or an alternative tool, so it falls short of a full routing rule.

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.