Skip to main content
Glama

vision.diff

Compares a current screenshot against a baseline to detect pixel changes, outputting change ratio and difference boxes; optionally runs OCR to list added or removed text.

Instructions

界面变化检测:当前截图 vs 基线的像素差异(变化占比+差异框);ocr=true 附文本增删

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ocrNotrue 时对两图各跑 OCR,返回文本集合差异
currentNo对比图路径;缺省当场截图
baselineNo基线图路径;缺省用最近一次 vision.screenshot
thresholdNo像素差灰度阈值(0-255),低于视为噪声

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the output shape (change ratio, diff boxes) and that ocr=true adds text add/delete, which is genuine behavioral context. However it omits anything about baseline selection behavior, tolerances being noise-based, or the read-only/analysis nature of the operation beyond the schema.

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

Conciseness5/5

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

A single front-loaded clause states the operation, the output, and the optional ocr behavior with zero filler. The semicolon structure reads cleanly and nothing is wasted.

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

Completeness4/5

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

With no output schema and no annotations, the description covers the essentials an agent needs: what is compared, what is returned, and the ocr extension. The main omission is disambiguation from the similar ui2.diff sibling, which leaves a routing gap.

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 all four parameters (ocr, current, baseline, threshold) are already documented in the schema. The description's mention of ocr=true only restates the schema's ocr semantics, adding no new syntax or default info, so the baseline of 3 applies.

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?

States a specific verb+resource: pixel-difference change detection between current screenshot and baseline, plus what is returned (change ratio + diff boxes). An agent understands the operation immediately, though the description never differentiates itself from the sibling ui2.diff, which sounds like an overlapping change-detection tool.

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

Usage Guidelines2/5

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

Usage is only implied (visual regression / change detection). There is no explicit when-to-use, no when-not-to-use, and no guidance on choosing this over siblings such as ui2.diff, ui2.wait_change, or vision.screenshot. The agent must infer the scenario by itself.

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