Skip to main content
Glama

browser_visual_component

Compare visual components by capturing a screenshot via CSS selector, comparing it against a baseline, and returning diff pixels, ratio, and pass status. Automatically creates a baseline if missing.

Instructions

组件级视觉对比:一次调用完成截取指定 CSS 选择器的组件截图 → 与同名基线对比 → 返回 diffPixels、diffRatio、passed。如果基线不存在则自动创建基线,返回 baseline_created 标记。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes组件基线名称,不含扩展名
selectorYesCSS 选择器,精确选择要对比的组件
sessionNameNo浏览器会话名称,默认当前活跃会话
maxDiffPixelRatioNo允许的最大差异像素比例,默认 0.01
Behavior4/5

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

With no annotations, the description carries full burden. It discloses auto-creation of baseline if missing, returning a baseline_created flag, and specifies return fields (diffPixels, diffRatio, passed). It could mention write operations explicitly, but overall transparent.

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?

The description is a single comprehensive sentence that efficiently conveys the tool's purpose, workflow, and return values. No wasted words; clear structure with arrow notation.

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?

Given no output schema, the description explains return values sufficiently. It covers core functionality but could mention handling of existing baselines and potential side effects. Still complete enough for an agent.

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%, providing baseline of 3. The description adds workflow context (e.g., 'exactly select component' for selector) and clarifies the purpose of parameters within the comparison workflow, enhancing understanding beyond 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 description clearly identifies the tool as performing component-level visual comparison, involving screenshot, baseline comparison, and return of diff metrics. It distinguishes from sibling tools like browser_visual_check (likely full-page) and browser_visual_snapshot (just snapshot).

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 usage for component-level baseline comparison but does not explicitly state when to use this tool versus alternatives, nor does it provide exclusion criteria. The context of sibling tools helps, but the description lacks direct guidance.

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