Skip to main content
Glama

verify_state

Idempotent

Evaluates state assertions independently and requires evidence from multiple signal channels before returning pass, fail, or unverifiable, preventing single-source claims from being silently accepted.

Instructions

出一份可证伪的验收结论:每条断言独立求值,并要求足够多的独立证据才判成立。

为什么必须有它(这是从 reverse-skill 的证据链契约学来的一条硬规则)

单条证据不得静默提升为「已验证」。它那条契约的原文是:

validated 需要 >=2 independent Evidence(最好 1 静态 + 1 动态); 单条证据不得静默提升为 validated。

我们自己的实战正好印证了这条:在 CatapultHero 验收 Mod 时, 我同时看了日志(已修改 精核 = 108)与屏幕 OCR(精核:108)—— 两个互相独立的来源给出同一个结论,才敢说「Mod 真的生效了」。 只看日志的话,日志本身是 Mod 打的,Mod 写错了照样打日志。

所以本工具把「要几条独立证据」变成显式参数,而不是留给 Agent 的直觉。

参数 checks 怎么传

逗号分隔的条目,每条形如 kind=参数,与 wait_for 共用同一套条件语义 (_eval_condition,所以两处结论必然一致):

写法

含义

log=<路径>#<正则>

日志里有匹配行(只读不消费)

ocr=<期望文本>

屏幕上 OCR 到该文本

window=<标题子串>

存在该窗口

field=<类>.<字段>=<期望值>

该字段当前等于期望值

instances=<类>>=<最小个数>

该类活实例数达到下限

示例(双证据验收 Mod 生效):

verify_state(checks="log=D:\\Game\\UE4SS.log#已修改 精核,"
                    "ocr=精核")

返回

· verdict —— pass / fail / unverifiable(三态,与 wait_for 同源)

  • pass 要求:成立条数 >= require_independent,且这些成立的条目 来自 >= require_independent 条不同的信号通道

  • 全部条件都成立但只有 1 条 → 判 fail 并说明「证据不足」, 不是 pass —— 这正是「单条证据不得静默提升」

  • 多条成立但全是同一条通道(如两条 ocr=)→ 同样判 fail, 并说明「同源,缺独立第 2 通道」—— 同一张截图上的两条断言会一起 对、也会一起错,不是「互相独立」的证据 · evidence —— 每条断言各自的 {check, hit, detail} · independent_count —— 成立的不同通道数(按 kind 去重), 与 passed(成立的条数)不同;independent_kinds 列出是哪几种 · require_independent / verdict_reason —— 门槛值与判定理由

Args: checks: 逗号分隔的断言列表,见上表。 require_independent: 判 pass 所需的成立条数下限(默认 2)。 设 1 会退化成「单条证据即通过」—— 只在确实只有一个可靠来源时用。

Returns: {ok, verdict, verdict_reason, evidence, independent_count, require_independent, passed, unverifiable_count}

Input Schema

NameRequiredDescriptionDefault
checksYes
require_independentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only give readOnlyHint=false, idempotentHint=true, destructiveHint=false, openWorldHint=true; the description goes well past that by explaining the pass/fail/unverifiable tri-state, the rule that a single channel can never silently become `pass`, and that same-channel duplicates are deliberately failed as non-independent. That is exactly the decision logic an agent needs and cannot get from annotations. It stops short of covering practical behavior such as what happens when a log path is missing or whether OCR capture itself has side effects, and the per-check claim that log reads are '只读不消费' sits in mild tension with readOnlyHint=false — not a direct contradiction, but unaddressed.

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?

The purpose is front-loaded in the first sentence and the parameter table is well-structured, but the description is padded with a long doctrinal rationale, a quoted external 'contract', and an extended anecdote about verifying a CatapultHero mod. The core operational facts (parameter syntax, verdict rules, return fields) would fit in roughly half the space, and the anecdote earns its place only as motivation.

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?

With only two parameters, no output schema, and thin annotations, the description supplies everything an agent needs: argument syntax for every check kind, the default and meaning of the threshold, the exact pass criterion, the independence/同源 failure rule, and a field-by-field account of the return object. Return values are described inline precisely because no output schema exists, which is the correct division of labor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and both parameters are bare (`checks` string, `require_independent` integer), so the description carries the full burden and does so with a five-row syntax table covering log/ocr/window/field/instances formats plus a concrete composed example. It also documents `require_independent`'s default of 2, what the value counts, and the consequence of lowering it to 1. This is complete compensation for a description-free schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line states a specific verb and outcome: evaluate each assertion independently and require enough independent evidence before returning a verdict. It also ties itself to `wait_for` by declaring shared condition semantics and a shared three-state verdict, which helps an agent place it among the sibling tools. It never states plainly that it is the non-blocking counterpart to `wait_for`, so the differentiation from that sibling remains implicit.

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?

The rationale section and the worked Mod example give a clear picture of when this tool is the right choice: situations needing a falsifiable acceptance verdict with at least two independent channels. The `require_independent=1` escape hatch is scoped with a caveat ('only when there truly is just one reliable source'). There is no explicit when-not statement and no direct comparison to `wait_for`, so it lands at a clear 4 rather than a 5.

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