Skip to main content
Glama

Redact and sanitize logs

redact_log

Redacts and neutralizes secrets, credentials, PII, terminal control characters, log-forging patterns, and oversized structured records in logs to prevent sensitive data exposure and log injection.

Instructions

Neutralize log forging, terminal controls, secrets, credentials, sensitive object keys, optional high-precision PII patterns, and oversized structured records with logcage.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "redact_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
piiNo
modeNo
textNo
recordNo
maxKeysNo
maxDepthNo
maxNodesNo
maxLengthNo
redactPathsNo
extraSecretsNo
sensitiveKeysNo
maxArrayLengthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/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, and it does add real content by enumerating the threat classes neutralized (log forging, terminal controls, secrets, credentials, PII). It does not say whether the operation is pure/read-only, what is returned, whether output truncation occurs, or how the size limits behave — gaps that matter for a tool taking 12 options.

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?

A single front-loaded sentence with no filler, but it is one dense comma-separated list that reads as a capability dump rather than structured guidance. It is arguably too terse given the 12 parameters and nested pii object.

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

Completeness2/5

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

For a 12-parameter tool with nested objects, no annotations, no output schema, and zero schema description coverage, the one-line description leaves the agent guessing about mode semantics, the size-limit parameters, and the return shape. It identifies the domain but is not complete enough to invoke confidently.

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 description coverage is 0%, so the description must compensate; it partially does by signaling categories behind parameters: "optional high-precision PII patterns" maps to the optional pii object, "secrets" and "credentials" to extraSecrets, "sensitive object keys" to sensitiveKeys, and "oversized structured records" to the max* limits. It adds no meaning for mode, redactPaths, or the individual limit thresholds, so it stays below a 5.

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?

Uses the specific verb "Neutralize" tied to a concrete resource/scope: log forging, terminal controls, secrets, credentials, sensitive keys, PII, and oversized records, plus the library name "logcage." An agent can tell this is a sanitization/redaction tool, though nothing in the text distinguishes it from the audit_* siblings beyond the obvious redact-vs-audit split.

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 when-to-use or when-not-to-use guidance is given; the agent must infer that this belongs upstream of logging or auditing. The choice between "escape" and "strip" modes — the one enum — is never explained, and no alternatives are named.

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