Skip to main content
Glama

DCL Trust Oracle — AI/LLM Output Audit (x402 MCP)

Output Sanitizer — Final Gate

dcl_evaluate_output_sanitizer

FINAL-GATE Output Sanitizer ($0.02). Post-processing checkpoint that strips secrets/credentials, PII, crypto material (seed phrases, private keys, wallet addresses), internal network details (private IPs, MAC addresses, .internal/.local/.corp hostnames), and unsafe shell/SQL/path-traversal fragments from a raw model response — plus a narrow, high-precision safety net for direct self-harm-instruction-seeking and targeted-harassment phrasing (not a general toxicity classifier). Returns a single sanitized_output with every match replaced by [REDACTED]; use that instead of the original whenever verdict is NO_COMMIT. Run this as the LAST gate before a response reaches its destination — after dcl_evaluate_jailbreak_crypto/other input-side checks have already run, and immediately before dcl_commit seals the final decision. Internally re-uses the same detection tables as dcl_evaluate_secrets/dcl_evaluate_pii for the secrets/PII categories, so results stay consistent with those tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesIdentifier of the agent that produced the response.
responseYesThe raw LLM/agent response to sanitize before it is delivered to a user, downstream agent, or external system.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tx_hashYesHash of this record in the tamper-evident audit chain.
verdictYesCOMMIT if the response was clean, otherwise NO_COMMIT.
findingsYesAll matches found, with position/severity/category detail. Empty list if verdict is COMMIT.
timestampYesUnix timestamp when this record was sealed.
confidenceYesConfidence score of the verdict, from 0.0 to 1.0.
input_hashYesHash of the sanitized text (raw content is never stored).
risk_scoreYes0.0-1.0 composite severity score.
violationsYesDistinct finding types matched (e.g. ['api_key', 'internal_ip']). Empty list if verdict is COMMIT.
chain_indexYesSequential index of this record in the audit chain.
redaction_countYesTotal number of items redacted.
sanitized_outputNoInput text with every match replaced by [REDACTED]. Null if verdict is COMMIT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / payment_id
      Removed value: -{
      -  "default": "",
      -  "description": "Optional payment identifier returned by a previous call when payment is required",
      -  "title": "Payment Id",
      -  "type": "string"
      -}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses the transformation behavior: "every match replaced by [REDACTED]" and "Returns a single sanitized_output." It also adds consistency context by noting it re-uses the same detection tables as dcl_evaluate_secrets/dcl_evaluate_pii. No contradiction exists with the provided annotations.

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?

The description is dense yet scannable: it front-loads the gate role, then lists redaction categories, output behavior, pipeline position, and sibling-tool consistency in compact clauses. Every sentence contributes actionable information with no filler.

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

Completeness5/5

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

The description covers what is redacted, how the output is shaped, where the tool sits in the pipeline, and how it relates to sibling tools. With an output schema already present, there is no missing material an agent needs to select and invoke this tool correctly.

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%, so the schema already fully documents both `response` and `agent_id`. The description reinforces that `response` means the raw model response and that the returned value should replace it, but adds no new parameter-level constraints or formatting details.

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?

The description states a precise verb-resource pair: it "strips secrets/credentials, PII, crypto material..." from "a raw model response." It also lists specific categories and explicitly says it is "not a general toxicity classifier," which sharply distinguishes it from sibling evaluate tools.

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?

The description gives explicit placement advice: "Run this as the LAST gate" and "after dcl_evaluate_jailbreak_crypto/other input-side checks have already run, and immediately before dcl_commit." It also tells the agent when to consume the result: "use that instead of the original whenever verdict is NO_COMMIT."

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.