Skip to main content
Glama

HallucC — Hallucination & Safety Guardian

Agent Ice Wall (Session Fuse)

check_agent_ice_wall

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. Changed16 schema fields changed
    • changedInput schema / properties / prior_steps / description
      Previous value: -"前序步(同 schema),供循环/重试风暴等跨步检测"New value: +"Prior steps (same schema), used for cross-step detection such as loops and retry storms"
    • changedInput schema / properties / session_id / description
      Previous value: -"会话 ID(由调用方自定并在整个 agent 会话内复用):风险分按 session 累积,超阈值整场冻结。同一 agent 任务务必用同一个 ID,不同任务不要复用。"New value: +"Session 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."
    • changedInput schema / properties / step / description
      Previous value: -"当前步(两种 schema 均兼容,服务端自动归一)"New value: +"Current step (both schemas accepted; the server normalizes automatically)"
    • changedInput schema / properties / step / properties / action / description
      Previous value: -"该步调用的工具/动作名"New value: +"Tool/action name called in this step"
    • changedInput schema / properties / step / properties / action_input / description
      Previous value: -"工具/动作输入"New value: +"Tool/action input"
    • changedInput schema / properties / step / properties / agent_claim / description
      Previous value: -"该步 agent 的声明(兼容 /detect-agent schema)"New value: +"The agent's claim for this step (compatible with the /detect-agent schema)"
    • changedInput schema / properties / step / properties / final_answer / description
      Previous value: -"最终回答(最后一步)"New value: +"Final answer (last step)"
    • changedInput schema / properties / step / properties / observation / description
      Previous value: -"工具/动作返回的观察"New value: +"Observation returned by the tool/action"
    • changedInput schema / properties / step / properties / step / description
      Previous value: -"步序号"New value: +"Step number"
    • changedInput schema / properties / step / properties / thought / description
      Previous value: -"该步思考"New value: +"The step's reasoning"
    • changedInput schema / properties / step / properties / tool / description
      Previous value: -"工具名(兼容 /detect-agent schema)"New value: +"Tool name (compatible with the /detect-agent schema)"
    • changedInput schema / properties / step / properties / tool_input / description
      Previous value: -"工具输入(兼容 /detect-agent schema)"New value: +"Tool input (compatible with the /detect-agent schema)"
    • changedInput schema / properties / step / properties / tool_output / description
      Previous value: -"工具输出(兼容 /detect-agent schema)"New value: +"Tool output (compatible with the /detect-agent schema)"
    • changedInput schema / properties / task / description
      Previous value: -"原始任务指令(参数来源校验用)"New value: +"Original task instruction (used to validate parameter provenance)"
    • changedInput schema / properties / tool_schemas / description
      Previous value: -"工具注册表 {工具名: {required, properties}};给了才启用捏造工具/参数 Schema 校验(这两项是零容忍熔断项)"New value: +"Tool registry {toolName: {required, properties}}; provide it to enable fabricated-tool and parameter-schema validation (both are zero-tolerance fuse conditions)"
    • changedOutput schema / properties / action / description
      Previous value: -"客户端唯一需要看的字段:frozen=整场立即停机"New value: +"The only field the client must read: frozen = halt the entire run immediately"
  2. Added

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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.