Skip to main content
Glama

state_diff_assert

Capture and compare page/API/storage state before and after operations to verify expected changes in UI, API, and data.

Instructions

捕获并对比操作前后的页面/API/存储状态,用于验证 UI、API、数据状态是否真的发生预期变化。先做进现有 MCP,后续可剥离为独立双链路验证模块。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNo可选,直接传入 after snapshot;不传则现场采集
labelNo本次状态采集或对比名称
actionNocapture=采集当前状态快照;compare=采集当前状态并与 before/compareTo 快照对比capture
beforeNo直接传入之前 capture 返回的 snapshot 对象
sourcesYes要采集的状态源列表
timeoutNo页面打开超时,默认 30000ms
evidenceNo是否生成步骤证据,默认 true
snapshotNo是否采集 DOM 简要快照,默认 true
compareToNo对比时引用之前 capture 返回的 snapshotId
targetUrlNo可选,采集前先打开的页面 URL
screenshotNo是否截图,默认 true
snapshotIdNo采集快照时指定 ID,便于后续 compareTo 引用
expectationsNo对比断言列表
beforeSnapshotIdNocompareTo 的别名
Behavior2/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It states the tool captures and compares state but does not disclose side effects (e.g., whether it modifies state, requires specific permissions, or has rate limits). The description also includes a forward-looking statement that adds no operational transparency. Key behavioral traits like return format or error handling are absent.

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 description is short with two sentences. The first sentence delivers the core purpose. The second sentence is slightly tangential, discussing future modularity. It is concise but could be tightened by removing the non-functional note. Structure is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (14 parameters, nested objects, no output schema), the description is insufficient. It does not explain how to invoke the two actions (capture vs. compare), how to interpret results, or what the snapshot/snapshotId concept means. The lack of output schema and missing behavioral details leave significant gaps for an agent to correctly use this tool.

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

Parameters3/5

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

Schema description coverage is 100%, so each parameter has a meaningful description in the schema. The tool description does not add additional semantics beyond the schema; it only provides a high-level summary. Baseline score of 3 is appropriate as the schema already adequately documents parameters.

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 clearly states the tool's purpose: capturing and comparing state (page/API/storage) before and after operations to verify expected changes. The verb 'capture and compare' and resource 'state' are specific, and it distinguishes from sibling tools which focus on individual browser actions or validation types.

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 description implies the tool is for verification of state changes but does not explicitly state when to use it versus alternatives. The note '先做进现有 MCP,后续可剥离' provides context on its current integration but not usage guidance. Among many sibling validation tools, no direct comparisons or exclusions are given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/validpilot/ai-verify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server