Skip to main content
Glama

Redact secrets & PII

redact_logs
Read-onlyIdempotent

Redact secrets, credentials, and PII from logs or manifests, then return cleaned text with per-rule counts and line numbers—never exposing secret values.

Instructions

Strip AWS keys, JWTs/service-account tokens, kubeconfig credentials, database connection-string passwords, .env secrets, private keys, API keys and PII from logs or manifests. Returns the clean text plus a redaction audit (counts per rule, line numbers) - never the secret values.

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

Input Schema

NameRequiredDescriptionDefault
textYesLogs, YAML, JSON or any text
redact_ipsNoAlso redact IPv4 addresses
include_piiNoAlso redact e-mails, card numbers, SSNs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds genuinely new behavior: it returns clean text plus a per-rule audit with counts and line numbers, and explicitly guarantees secret values are never echoed back. It stops short of disclosing input size limits, regex false-positive behavior, or whether partial matches are preserved.

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?

Two sentences, front-loaded with the core action and closed with the return contract. The long enumeration of secret types is dense but each item carries signal about what rules exist; the only mild waste is that some categories overlap with the "PII" summary term.

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?

There is no output schema, so the description correctly spends its second sentence describing the return value and the never-echo-secrets guarantee — exactly the gap that matters. With only three simple flat parameters and full annotation coverage, the definition is nearly complete; only input-size or failure-mode caveats are missing.

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 all three parameters (text, redact_ips, include_pii) are already documented with types, defaults, and descriptions. The description adds nothing about the optional flags — notably it does not reconcile its blanket "PII" claim with include_pii defaulting to true and redact_ips defaulting to false. Baseline 3 is appropriate.

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?

States a specific verb ("strip/redact") against a specific resource (secrets and PII in logs or manifests) and enumerates the concrete secret classes covered (AWS keys, JWTs, kubeconfig creds, connection-string passwords, .env, private keys, API keys). None of the siblings (diagnose_pod, validate_manifest, audit_cluster_risks, classify_command) do redaction, so the tool is unambiguous without opening the schema.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer this is the tool to sanitize text before sharing or storing it, but the description never says when to reach for it, when not to (e.g. binary or huge inputs), or how it relates to any sibling. No alternatives or prerequisites are named.

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