Skip to main content
Glama

browser_visual_snapshot

Capture screenshot, DOM snapshot, and computed CSS properties in one call. Automatically detects UI issues like invisible text, overlapping elements, and overflow.

Instructions

Three-level snapshot: capture screenshot + DOM state snapshot + CSS computed properties in one call, with automatic L1+L2 UI issue detection (invisible text, overlapping elements, large blank regions, z-index occlusion, small click targets, overflow).

中文详情:

  • 用途:三级快照工具,一次性获取截图 + DOM 状态快照 + CSS 计算属性,并自动检测 L1+L2 级别 UI 问题

  • 何时使用:UI 缺陷排查时需要同时查看图/结构/样式时;调试元素不可见原因时;自动化发现问题后人工定位时;回归测试前留档页面状态时

  • 输出:{ ok: boolean, screenshotPath: string, dom: object, computedStyles: object, issues: array, viewport: { width, height }, timestamp: string }

  • 参数:

    • selector (string, 可选):CSS 选择器;不传则全页

    • fullPage (boolean, 可选):是否全页截图,默认 true

    • includeMetadata (boolean, 可选):是否包含完整元数据,默认 true

    • detectIssues (boolean, 可选):是否自动检测 UI 问题,默认 true

    • viewportWidth (integer, 可选):自定义 viewport 宽度

    • viewportHeight (integer, 可选):自定义 viewport 高度

    • sessionName (string, 可选):浏览器会话名称,默认当前活跃会话

  • 错误:selector 无匹配抛出 'element not found';浏览器未启动抛出 'Browser not launched'

  • 示例:{"selector":".header","fullPage":false,"detectIssues":true,"viewportWidth":375,"viewportHeight":812}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullPageNo是否全页截图,默认 true
selectorNo可选 CSS 选择器;不传则全页
sessionNameNo浏览器会话名称,默认当前活跃会话
detectIssuesNo是否自动检测 UI 问题,默认 true
viewportWidthNo自定义 viewport 宽度
viewportHeightNo自定义 viewport 高度
includeMetadataNo是否包含完整元数据,默认 true
Behavior4/5

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

The description details the output structure, automatic issue detection, and errors for missing selectors or unlaunched browsers. Without annotations, it covers essential behavioral aspects, though it could mention that it is a read-only operation (no destructive side effects).

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 well-structured with clear sections (purpose, details, output, parameters, errors, example). It is front-loaded with a concise English summary, but includes duplicate information in Chinese and English, making it slightly longer than necessary.

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 the 7 optional parameters and no output schema, the description covers output shape, parameter details, errors, and provides an example. It is sufficient for an agent to use correctly, though the return format's properties (e.g., issues array) could be elaborated.

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 coverage is 100%, so baseline is 3. The description adds context like example usage and defaults, but much of the parameter info is already in the schema. The description does not significantly enhance understanding beyond the 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 states it is a 'three-level snapshot' combining screenshot, DOM snapshot, and CSS properties with automatic UI issue detection. This distinguishes it from sibling tools like browser_visual (just screenshot) and browser_snapshot (likely just DOM).

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 description explicitly lists when to use the tool (e.g., debugging invisible elements, regression testing). It also mentions error conditions. However, it does not explicitly state when not to use or name alternative tools for comparison.

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