Skip to main content
Glama

browser_visual

Capture visual baselines, compare screenshots, detect UI issues, and review visual reports for automated visual regression testing.

Instructions

视觉回归与 UI 检查工具(v1.9.5 起合并 browser_visual_baseline/compare/report/check/snapshot + screenshot_diff)。通过 mode 参数区分子模式:baseline(默认,建立视觉基线 PNG)/ compare(截取实际图与基线对比,生成 diff)/ report(列出所有视觉产物)/ check(无基线 UI 问题扫描)/ snapshot(三级快照:截图+DOM+CSS)/ diff(手动指定两张截图对比,等价于已废弃的 screenshot_diff)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo视觉模式:baseline(默认,建立基线)/ compare(与基线对比)/ report(列出视觉产物)/ check(UI 问题扫描)/ snapshot(三级快照)/ component(组件级元素视觉比对,需指定 name 和 selector)/ diff(手动对比两张截图,等价于 screenshot_diff)baseline
nameNo基线/对比/产物名称,不含扩展名(mode=baseline/compare/component/diff 时使用;mode=component 时必填)
fullPageNo是否全页截图,默认 true;selector 存在时忽略(mode=baseline/compare/snapshot 时使用)
selectorNo可选 CSS 选择器;指定后只截取该元素(mode=baseline/compare/snapshot/diff 时使用;mode=component 时必填)
severityNo最低报告级别(mode=check 时使用),默认 majormajor
afterPathNoactualPath 的别名(mode=diff 时使用)
thresholdNo差异阈值,默认 0.01(mode=diff 时使用)
viewportsNo响应式检查的 viewport 列表(mode=check 时使用)
actualPathNo实际截图路径(mode=diff 时使用)
beforePathNobaselinePath 的别名(mode=diff 时使用)
sessionNameNo浏览器会话名称,默认当前活跃会话(mode=baseline/compare/snapshot/component 时使用)
baselinePathNo基线截图路径(mode=diff 时使用)
detectIssuesNo是否自动检测 UI 问题,默认 true(mode=snapshot/check 时使用)
maskSelectorsNo截图前额外遮挡/脱敏的 CSS 选择器列表,用于忽略动态区域(mode=baseline/compare 时使用)
viewportWidthNo自定义 viewport 宽度(mode=snapshot 时使用)
viewportHeightNo自定义 viewport 高度(mode=snapshot 时使用)
includeMetadataNo是否包含完整元数据,默认 true(mode=snapshot 时使用)
includeResponsiveNo是否包含响应式检查,默认 false(mode=check 时使用)
maxDiffPixelRatioNo组件级视觉比对允许的最大差异像素比例,默认 0.01(mode=component 时使用)
includeAccessibilityNo是否包含可访问性检查,默认 true(mode=check 时使用)
Behavior3/5

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

No annotations are provided, so the description must shoulder the behavioral burden. It explains the tool as a merged entity and describes each mode's action (e.g., generating baselines, diffs, reports). However, it does not disclose side effects like file creation, resource usage, or prerequisites for each mode.

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 a single, dense paragraph that efficiently conveys the tool's nature and mode breakdown. Every sentence provides necessary information without redundancy. Slightly longer due to parameter enumeration, but justified by complexity.

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

Completeness3/5

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

Given 20 parameters and no output schema, the description adequately outlines mode-specific usage. However, it lacks information about return values or output structure, which is needed for an agent to interpret results correctly.

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?

The input schema has 100% parameter description coverage. The description adds value by grouping parameters per mode (e.g., 'mode=diff 时使用'), clarifying context beyond schema. This helps an agent understand parameter applicability.

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 description clearly states it is a visual regression and UI checking tool that consolidates multiple modes. It uses specific verbs and resources ('视觉回归', 'UI 检查'). However, it does not explicitly differentiate from sibling tools like browser_screenshot or browser_snapshot, which carry similar functionality.

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 provides a detailed breakdown of each mode and when to use them (e.g., 'baseline(默认,建立视觉基线 PNG)'). It lacks external guidance on when to prefer this tool over siblings or when not to use it.

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