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

HallucC — Hallucination Fact-Check & AI Safety Guard

Classify CUA Actions

check_cua_actions
Read-only

Grades computer-use agent action trajectories step by step, returning L0–L3 risk verdicts with matched rules before and after execution to flag risky clicks, pastes, payments and commands.

Instructions

Computer-Use Agent action risk grading. Submit an action trajectory and receive a step-by-step verdict of L0 (allow) / L1 (allow + log) / L2 (require confirmation) / L3 (block) / takeover (suspend in credential scenarios and wait for the user to type manually), together with matched_rules, outcome and L0-L3 tallies. The response includes ruleset_version and a disclaimer (results are grading guidance only; no enforcement is performed). Coverage: sensitive paths, destructive commands, irreversible element semantics; domain grading (unknown-domain navigation -> L2, blocklisted domains and sensitive pastes into unknown domains -> L3, payment amounts above threshold -> L3); credential vocabularies and takeover on payment/login domains; task_scope intent deviation (out of scope escalates one level and can only narrow); multi-agent delegation chain fields (each action may carry chain_id/agent_id/parent_agent_id/delegation_depth; when provided the server adds chain-level cross-hop taint analysis, raising the aggregate level to L3 and setting risk_diluted on cross-agent propagation, returned in the chain_trace field; omitted means no effect). Pure rule-based: no LLM calls, no quota consumed. Use it for safety self-checks before and after agent execution.

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": {
      "actions": "<actions>"
    },
    "name": "check_cua_actions"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionsYesAction sequence to grade (1-500 actions)
session_idNoWhen provided, grading results are written to the audit table and can be replayed at /cua/audit
task_scopeNoTask intent alignment (narrowing): actions outside the scope are handled one level higher (L0->L1, L1->L2, L2 stays but gains a reason, L3 unchanged). Escalation only, never a downgrade; omitted means no effect.

Output Schema

NameRequiredDescriptionDefault
chainsNo
resultsNo
summaryNo
warningNo
disclaimerNo
session_idNo
chain_traceNo
has_propagationNo
injection_stepsNo
ruleset_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed33 schema fields changedv0.1.12
    • changedInput schema / properties / actions / description
      Previous value: -"待分级的动作序列(1~500 条)"New value: +"Action sequence to grade (1-500 actions)"
    • changedInput schema / properties / actions / items / description
      Previous value: -"单条 CUA 动作"New value: +"A single CUA action"
    • changedInput schema / properties / actions / items / properties / action / description
      Previous value: -"动作名(click/press/hotkey/write/move…),省略则按坐标推断"New value: +"Action name (click/press/hotkey/write/move...); inferred from coordinates when omitted"
    • changedInput schema / properties / actions / items / properties / action_input / description
      Previous value: -"ReAct 形态输入别名 → text"New value: +"ReAct-style input alias -> text"
    • changedInput schema / properties / actions / items / properties / agent_id / description
      Previous value: -"P1-9 本动作所属 Agent 名(如 research),配合 registered_agents 做注册校验"New value: +"P1-9 Name of the agent this action belongs to (e.g. research); used with registered_agents for registration validation"
    • changedInput schema / properties / actions / items / properties / app / description
      Previous value: -"target_app 别名"New value: +"Alias for target_app"
    • changedInput schema / properties / actions / items / properties / chain_id / description
      Previous value: -"P1-9 多智能体委托链 id(uuid hex);给了则审计按 chain_id 跨会话聚合,可在 /cua/audit 看链路视图"New value: +"P1-9 Multi-agent delegation chain id (uuid hex); when provided, audit records aggregate across sessions by chain_id and a chain view is available at /cua/audit"
    • changedInput schema / properties / actions / items / properties / coordinate / description
      Previous value: -"[x, y] 二元组(与 x/y 二选一)"New value: +"[x, y] pair (alternative to x/y)"
    • changedInput schema / properties / actions / items / properties / delegation_depth / description
      Previous value: -"P1-9 委托深度(根 Agent=0);超 delegation_max_depth 升 L2"New value: +"P1-9 Delegation depth (root agent = 0); exceeding delegation_max_depth escalates to L2"
    • changedInput schema / properties / actions / items / properties / element / description
      Previous value: -"target_element 别名"New value: +"Alias for target_element"
    • changedInput schema / properties / actions / items / properties / parent_agent_id / description
      Previous value: -"P1-9 委托方 Agent 名;跨 agent 边界的传播链由此配对"New value: +"P1-9 Name of the delegating agent; cross-agent propagation chains are paired with this"
    • changedInput schema / properties / actions / items / properties / path / description
      Previous value: -"target_path 别名"New value: +"Alias for target_path"
    • changedInput schema / properties / actions / items / properties / target_app / description
      Previous value: -"目标应用"New value: +"Target application"
    • changedInput schema / properties / actions / items / properties / target_element / description
      Previous value: -"目标元素标签"New value: +"Target element label"
    • changedInput schema / properties / actions / items / properties / target_path / description
      Previous value: -"文件操作路径 / 终端命令路径"New value: +"File operation path / terminal command path"
    • changedInput schema / properties / actions / items / properties / target_url / description
      Previous value: -"浏览器动作的目标 URL(域名分级 / 未知域导航 / 粘贴到未知域规则用)"New value: +"Target URL of browser actions (used by domain grading, unknown-domain navigation and paste-into-unknown-domain rules)"
    • changedInput schema / properties / actions / items / properties / task_scope / description
      Previous value: -"P1-5 任务允许范围声明(服务端按动作读取;越界升一级,只能收窄)"New value: +"P1-5 Declared allowed task scope (read per action by the server; out of scope escalates one level and can only narrow)"
    • changedInput schema / properties / actions / items / properties / task_scope / properties / allowed_apps / description
      Previous value: -"允许的前台应用白名单"New value: +"Allowed foreground applications"
    • changedInput schema / properties / actions / items / properties / task_scope / properties / allowed_domains / description
      Previous value: -"允许访问的域名白名单(后缀匹配含子域)"New value: +"Allowed domains (suffix match, including subdomains)"
    • changedInput schema / properties / actions / items / properties / task_scope / properties / forbidden_elements / description
      Previous value: -"禁止出现的元素标签(最高优先级)"New value: +"Forbidden element labels (highest priority)"
    • changedInput schema / properties / actions / items / properties / task_scope / properties / task / description
      Previous value: -"声明的任务意图(如「整理本周会议纪要」)"New value: +"Declared task intent (for example, \"summarize this week's meeting notes\")"
    • changedInput schema / properties / actions / items / properties / text / description
      Previous value: -"type/key/paste 的内容"New value: +"Content for type/key/paste"
    • changedInput schema / properties / actions / items / properties / thought / description
      Previous value: -"agent 推理文本(审计留痕)"New value: +"Agent reasoning text (audit trail)"
    • changedInput schema / properties / actions / items / properties / url / description
      Previous value: -"target_url 别名"New value: +"Alias for target_url"
    • changedInput schema / properties / actions / items / properties / x / description
      Previous value: -"坐标式点击 X"New value: +"X coordinate of the click"
    • changedInput schema / properties / actions / items / properties / y / description
      Previous value: -"坐标式点击 Y"New value: +"Y coordinate of the click"
    • changedInput schema / properties / session_id / description
      Previous value: -"给了则把分级结果写入审计表,可在 /cua/audit 回放"New value: +"When provided, grading results are written to the audit table and can be replayed at /cua/audit"
    • changedInput schema / properties / task_scope / description
      Previous value: -"任务意图对齐(收窄机制):动作越出 scope 时升一级处置(L0→L1、L1→L2、L2 保持但追加原因、L3 不变)。只能升级不能降级;不传则零影响。"New value: +"Task intent alignment (narrowing): actions outside the scope are handled one level higher (L0->L1, L1->L2, L2 stays but gains a reason, L3 unchanged). Escalation only, never a downgrade; omitted means no effect."
    • changedInput schema / properties / task_scope / properties / allowed_apps / description
      Previous value: -"允许的前台应用白名单"New value: +"Allowed foreground applications"
    • changedInput schema / properties / task_scope / properties / allowed_domains / description
      Previous value: -"允许访问的域名白名单(后缀匹配含子域)"New value: +"Allowed domains (suffix match, including subdomains)"
    • changedInput schema / properties / task_scope / properties / forbidden_elements / description
      Previous value: -"禁止出现的元素标签(最高优先级)"New value: +"Forbidden element labels (highest priority)"
    • changedInput schema / properties / task_scope / properties / task / description
      Previous value: -"声明的任务意图(如「整理本周会议纪要」)"New value: +"Declared task intent (for example, \"summarize this week's meeting notes\")"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "chain_trace": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "chains": {
      +      "anyOf": [
      +        {
      +          "items": {},
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "disclaimer": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "has_propagation": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "injection_steps": {
      +      "anyOf": [
      +        {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "results": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "action": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": {},
      +                    "propertyNames": {
      +                      "type": "string"
      +                    },
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "level": {
      +                "anyOf": [
      +                  {
      +                    "enum": [
      +                      "L0",
      +                      "L1",
      +                      "L2",
      +                      "L3"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "matched_rules": {
      +                "anyOf": [
      +                  {
      +                    "items": {},
      +                    "type": "array"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "outcome": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "reasons": {
      +                "anyOf": [
      +                  {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "step": {
      +                "anyOf": [
      +                  {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "verdict": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "ruleset_version": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "session_id": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "summary": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {
      +            "L0": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "L1": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "L2": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "L3": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "blocked": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "confirm": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "takeover": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "total": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "warning": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed8 schema fields changedv0.1.10
    • addedInput schema / properties / actions / items / properties / agent_id
      Added value: +{
      +  "description": "P1-9 本动作所属 Agent 名(如 research),配合 registered_agents 做注册校验",
      +  "type": "string"
      +}
    • addedInput schema / properties / actions / items / properties / chain_id
      Added value: +{
      +  "description": "P1-9 多智能体委托链 id(uuid hex);给了则审计按 chain_id 跨会话聚合,可在 /cua/audit 看链路视图",
      +  "type": "string"
      +}
    • addedInput schema / properties / actions / items / properties / delegation_depth
      Added value: +{
      +  "description": "P1-9 委托深度(根 Agent=0);超 delegation_max_depth 升 L2",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / actions / items / properties / parent_agent_id
      Added value: +{
      +  "description": "P1-9 委托方 Agent 名;跨 agent 边界的传播链由此配对",
      +  "type": "string"
      +}
    • addedInput schema / properties / actions / items / properties / target_url
      Added value: +{
      +  "description": "浏览器动作的目标 URL(域名分级 / 未知域导航 / 粘贴到未知域规则用)",
      +  "type": "string"
      +}
    • addedInput schema / properties / actions / items / properties / task_scope
      Added value: +{
      +  "description": "P1-5 任务允许范围声明(服务端按动作读取;越界升一级,只能收窄)",
      +  "properties": {
      +    "allowed_apps": {
      +      "description": "允许的前台应用白名单",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "allowed_domains": {
      +      "description": "允许访问的域名白名单(后缀匹配含子域)",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "forbidden_elements": {
      +      "description": "禁止出现的元素标签(最高优先级)",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "task": {
      +      "description": "声明的任务意图(如「整理本周会议纪要」)",
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "task"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / actions / items / properties / url
      Added value: +{
      +  "description": "target_url 别名",
      +  "type": "string"
      +}
    • addedInput schema / properties / task_scope
      Added value: +{
      +  "description": "任务意图对齐(收窄机制):动作越出 scope 时升一级处置(L0→L1、L1→L2、L2 保持但追加原因、L3 不变)。只能升级不能降级;不传则零影响。",
      +  "properties": {
      +    "allowed_apps": {
      +      "description": "允许的前台应用白名单",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "allowed_domains": {
      +      "description": "允许访问的域名白名单(后缀匹配含子域)",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "forbidden_elements": {
      +      "description": "禁止出现的元素标签(最高优先级)",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "task": {
      +      "description": "声明的任务意图(如「整理本周会议纪要」)",
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "task"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations, the description discloses a lot: pure rule-based with no LLM calls and no quota consumed, no enforcement performed ('grading guidance only'), and the exact escalation semantics for task_scope ('escalates one level and can only narrow') and for delegation chains ('raising the aggregate level to L3 and setting risk_diluted'). One gap remains: it never mentions that supplying session_id writes grading results to the audit table, which is the one side effect an agent should know about.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded correctly — purpose, then verdict levels, then response, then coverage, then caveats — but it is delivered as one dense run-on block where the coverage enumeration and the multi-agent parenthetical pile clauses onto single sentences. The length is defensible for the tool's complexity, yet the structure makes it harder to scan than it needs to be.

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 rule-based grading tool with nested parameters and an output schema, everything an agent needs is present: what it grades, the verdict scale including the takeover state, the coverage areas, escalation rules, and the cost model. Return values are additionally summarized even though the output schema already carries them.

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, and the description earns an extra point by adding behavior the schema does not state: that the chain fields trigger server-side cross-hop taint analysis, that the result surfaces in a chain_trace field, and that omitting the fields means 'no effect'. It does not explain the coordinate/text alias precedence, but that is already documented in the 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?

The opening sentence names a specific verb and resource ('Computer-Use Agent action risk grading') and the next states exactly what is submitted and returned ('Submit an action trajectory and receive a step-by-step verdict of L0...L3 / takeover'). It also enumerates the concrete rule domains covered, so an agent can tell this apart from generic siblings like check_safety or verify_text.

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

Usage Guidelines3/5

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

The final sentence gives a usable usage context: 'Use it for safety self-checks before and after agent execution.' That is real when-to-use guidance, but there are no when-not conditions and no explicit routing against the sibling safety tools (check_safety, check_agent_ice_wall), so the agent must infer the boundary itself.

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