Skip to main content
Glama
aletheia-aegis

aletheia-aegis

aegis_check_output

Check a model response before it reaches the user: runs deterministic guards for ungrounded confidence, PII or secret leaks, unverified identity grants and high-stakes advice, returning ALLOW, FLAG or BLOCK with findings.

Instructions

Check a model response before it reaches the user. Runs the deterministic output guard across S1 (ungrounded confidence), S2a (unverified identity grants), S3-output (PII/secrets in the response), S4 (literal-trap heuristic, experimental), S5 (high-stakes advice without deferral), S6 (crisis/vulnerability signals), and S7 (institutional amplification). Returns ALLOW, FLAG, or BLOCK with findings, evidence, and remediation. Pass user_prompt when available: S2a, S4 and S6 need it for their main checks. By default it runs offline pattern detectors only (sub-millisecond, no network). If the operator has configured a model judge (AEGIS_JUDGE_PROVIDER plus their own API key), the reply is also reviewed by that model, which catches far more failures; the result's mode and judge fields say what ran.

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": {
      "response": "<response>"
    },
    "name": "aegis_check_output"
  }
}

Input Schema

NameRequiredDescriptionDefault
judgeNoSet false to skip the model judge for this call (patterns only). Honored only when the operator sets AEGIS_JUDGE_ALLOW_OPT_OUT=1; ignored when no judge is configured.
localeNoLocale for crisis resources, e.g. US, GB, CA, AU, NZ, IN. Falls back to AEGIS_LOCALE, then US. Unknown locales get US resources plus the international directory (findahelpline.com).
contextNoOptional free-form context (e.g. channel). Never stored with response text.
responseYesThe model response to check.
user_promptNoThe user message the response answers. Enables the prompt-dependent S2a, S4 and S6 checks.
block_checksNoCheck ids to escalate from FLAG to BLOCK for this call, e.g. ["S5_DOSAGE_WITHOUT_DEFERRAL"]. Lets a deployer raise severity per check without changing the defaults.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the default offline, sub-millisecond, no-network behavior and explains that the optional model judge depends on operator configuration. It also explains the mode and judge result fields and the experimental status of S4, though it does not cover auth or rate-limit behavior.

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 purpose and return values, then conditions, then the optional judge behavior. It is dense but every clause carries information; the long enumeration of checks is justified by the tool's breadth, though it could be tightened slightly.

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?

For a six-parameter guard tool with no output schema, the description explains the return shape (ALLOW/FLAG/BLOCK plus findings, evidence, remediation) and the mode/judge fields, and it covers the judge opt-out and check escalation behavior. Nothing essential for correct invocation is missing.

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 already 100%, so the baseline is 3; the description adds real meaning by explaining that user_prompt unlocks the prompt-dependent S2a, S4, and S6 checks rather than merely supplying context. It also clarifies the interaction between judge and operator opt-out settings beyond what the schema states.

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 and resource ("Check a model response before it reaches the user") and immediately scopes it to the deterministic output guard across named checks S1–S7. The return contract (ALLOW, FLAG, BLOCK with findings, evidence, remediation) makes it distinguishable from the other aegis_* tools.

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 clear operating context: pass user_prompt when available because S2a, S4, and S6 depend on it, and the judge only runs when the operator configures a provider and key. It does not name sibling alternatives or state when not to use this tool, so it falls short of explicit routing guidance.

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