Skip to main content
Glama

aegis_redact_sensitive_data

Read-onlyIdempotent

Redact PII and secrets from free-form text or JSON objects, including emails, credit cards, IBANs, JWTs, private keys, tokens, and phone numbers.

Instructions

Deterministically redact PII and secrets (emails, Luhn-validated credit cards, ISO 7064 mod-97 IBANs, Spanish DNI/NIE, JWTs, PEM private keys, cloud/API tokens, E.164 phone numbers, and high-entropy secrets) from free-form text or a JSON object. Read-only and idempotent; does not write to the audit ledger. Provide at least one of 'text' or 'payload'. Do NOT use this when you need threat scoring or RBAC enforcement (use aegis_inspect_tool_call instead).

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

Input Schema

NameRequiredDescriptionDefault
textNoOptional free-form string to redact.
payloadNoOptional JSON object to redact recursively.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing that redaction is deterministic, that it does not write to the audit ledger, and which detection algorithms back the match set. The annotations already cover readOnly/idempotent/destructive=false, so the marginal value here is the audit-ledger and determinism detail. It stops short of describing the return form (the redacted copy or placeholder format), which matters since there is no output schema.

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?

Front-loaded with capability, then the input constraint, then the sibling exclusion — a sensible order with no filler sentences. The detector list is long but each item earns its place by telling the agent what patterns are actually caught, though it borders on a catalogue.

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?

For a two-parameter, read-only DLP utility with full schema coverage and no output schema, the description covers purpose, input requirements, exclusions, and key behavioral guarantees. The one remaining gap is what the caller receives back (redacted text vs. structured findings), which an agent may need to parse results.

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 coverage is 100%, so the baseline would be 3, but the description adds a constraint the schema cannot express: because neither parameter is required, 'provide at least one of text or payload' is essential to avoid a vacuous call. It also characterizes payload as recursively redacted, matching the nested-object 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?

Opens with a specific verb and resource ('Deterministically redact PII and secrets') and then enumerates exactly which detectors apply (emails, Luhn-validated cards, ISO 7064 mod-97 IBANs, DNI/NIE, JWTs, PEM keys, E.164 numbers, high-entropy secrets). This is far more precise than a sibling like aegis_inspect_tool_call, and an agent can tell the two apart from the text alone.

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

Usage Guidelines5/5

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

States a positive precondition ('Provide at least one of text or payload') and an explicit exclusion with the named alternative: do NOT use for threat scoring or RBAC enforcement, use aegis_inspect_tool_call instead. Both the when and the when-not are present with a routing target.

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