Skip to main content
Glama
HallucC — Hallucination Fact-Check & AI Safety Guard

HallucC — Hallucination Fact-Check & AI Safety Guard

Agent Ice Wall (Session Fuse)

check_agent_ice_wall

Guard every LLM agent step against hallucination and accumulated risk; returns allow, warn, block, or freeze so unsafe tool actions are intercepted before execution.

Instructions

Agent ice wall (child lock / fuse). Call it once before every agent step for per-step hallucination guardrails plus session-level cumulative risk fusing. The response's action field is the only one you need to read: allow/warn = proceed, block = this step is intercepted, frozen = halt the entire run immediately (the risk score passed the threshold, or a zero-tolerance condition such as a fabricated tool was hit; no action should be executed while frozen). Fuse conditions: block = 3 points, warn = 1 point, accumulated >= 10; three consecutive blocks; or a single fabricated-tool / parameter-schema violation. It auto-unfreezes after a 5-minute cooldown, or the user can reset it manually. session_id is caller-defined and must be reused for the whole agent task (state lives in your cloud account, zero local install and zero local storage). Pass tool_schemas as a tool registry to enable fabricated-tool and parameter validation (strongly recommended). Consumes quota. Orthogonal to check_cua_actions (CUA desktop action grading): this tool governs an LLM agent's own loss of control.

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": {
      "session_id": "<session_id>",
      "step": "<step>"
    },
    "name": "check_agent_ice_wall"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepYesCurrent step (both schemas accepted; the server normalizes automatically)
taskNoOriginal task instruction (used to validate parameter provenance)
session_idYesSession ID (caller-defined and reused across one agent session): the risk score accumulates per session, and exceeding the threshold freezes the entire run. Always reuse one ID for a single agent task; never reuse it across tasks.
prior_stepsNoPrior steps (same schema), used for cross-step detection such as loops and retry storms
tool_schemasNoTool registry {toolName: {required, properties}}; provide it to enable fabricated-tool and parameter-schema validation (both are zero-tolerance fuse conditions)

Output Schema

NameRequiredDescriptionDefault
stepNo
quotaNo
actionNoThe only field the client must read: frozen = halt the entire run immediately
sessionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.12

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false), the description discloses quota consumption, cloud-side session state ("zero local install and zero local storage"), the point-accumulation rules (block=3, warn=1, threshold 10), zero-tolerance triggers, and the auto-unfreeze window. That is substantial behavioral context. What it leaves implicit is the actual response payload shape—it names only the action field—though an output schema exists to cover the rest.

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?

The definition is front-loaded with the call rule and the action-field contract, then moves to fuse conditions and session lifecycle—a sensible order with no filler sentences. It is dense and long, and the fuse-condition sentence packs several clauses that could be split for faster scanning, but every sentence carries operational information.

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 stateful, quota-consuming gate with nested step/prior_steps objects and an output schema, the description covers everything an agent needs to call it correctly: cadence, session lifecycle, what triggers a freeze, how to recover, and which response field to read. Return-value detail is appropriately deferred to the existing output schema.

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 is 3, but the description adds real meaning: session_id must be reused for the whole task and never across tasks because risk accumulates per session, and tool_schemas enables the two zero-tolerance validation conditions. These are usage-critical semantics that go past the field-level descriptions. It does not, however, explain the relationship between the step sub-fields (tool vs action vs action_input) that the schema presents as alternative shapes.

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 gives a specific verb and resource (a per-step guardrail check gated on session risk) and immediately frames the scope: "Call it once before every agent step for per-step hallucination guardrails plus session-level cumulative risk fusing." It also explicitly distinguishes itself from the sibling check_cua_actions ("orthogonal... this tool governs an LLM agent's own loss of control"), so an agent can choose correctly without opening either schema.

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?

It states the exact call cadence (once before every agent step), the recommended configuration (pass tool_schemas to enable fabricated-tool and parameter validation), the never-do (no action should be executed while frozen), and how the fused state clears (5-minute auto-cooldown or manual reset). It also rules out the most likely wrong alternative by naming check_cua_actions and explaining the different concern it addresses.

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