Skip to main content
Glama

browser_screenshot

Capture screenshots of web pages or elements to validate rendering, record bug evidence, and support visual comparisons. Sensitive inputs are automatically redacted.

Instructions

Take a screenshot of the current page and save it to the MCP artifacts directory. Sensitive inputs (password, token, apiKey) are auto-redacted by default.

中文详情:

  • 用途:对真实浏览器当前页面截图并保存为 PNG 文件到 screenshots 目录

  • 何时使用:验证页面渲染结果时;记录 bug 证据时;视觉对比前截取基线/实际图时;流程关键节点留证时

  • 输出:{ ok: boolean, path: string, name: string, timestamp: string } — path 为截图绝对路径

  • 参数:

    • name (string, 可选):截图文件名(不含扩展名),默认使用时间戳

    • redactSelectors (array, 可选):需要额外遮挡的 CSS 选择器列表,默认已遮挡 [type=password]、[name*=token]、[name*=apiKey]

  • 错误:浏览器未启动抛出 'Browser not launched';截图失败抛出 'Screenshot failed'

  • 示例:{"name":"login-page","redactSelectors":[".credit-card"]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo截图模式:page(默认,整页截图)/ element(元素截图,等价于已废弃的 browser_screenshot_element,需指定 selector)page
nameNo截图文件名,不含扩展名
paddingNo截图区域周围的 padding,单位像素,默认 0(mode=element 时使用)
selectorNo目标元素的 CSS 选择器(mode=element 时必填)
redactSelectorsNo需要额外遮挡的 CSS 选择器列表(mode=page 时使用)
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses auto-redaction of sensitive inputs, default redactSelectors, error conditions ('Browser not launched', 'Screenshot failed'), and the output format. It also explains the mode parameter maps to deprecated tools. Missing details on permissions or rate limits, but overall high transparency.

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

Conciseness3/5

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

The description includes both English and Chinese sections, which introduces redundancy. The English part is concise (2 sentences), but the Chinese section, while structured, repeats and expands on the same information. This adds length beyond what is necessary for a single-language agent.

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 5 parameters, no required, schema coverage 100%, and no output schema, the description compensates by defining the output structure, error cases, and usage scenarios. It also explains the relationship to deprecated browser_screenshot_element. Minor omissions: the conditional requirement of selector when mode='element' is only in the Chinese section, but overall it is fairly complete.

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 value by explaining defaults (name defaults to timestamp, redactSelectors defaults) and the redaction feature, but these are partially implied by the schema. The Chinese section provides additional context but does not significantly surpass 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 explicitly states 'Take a screenshot of the current page and save it to the MCP artifacts directory', providing a clear verb and resource. The Chinese section further specifies '对真实浏览器当前页面截图并保存为 PNG 文件', which distinguishes it from visual comparison tools like browser_visual_check.

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 Chinese section lists explicit when-to-use scenarios: verifying page rendering, recording bug evidence, capturing baselines for visual comparison, and documenting key steps. It also mentions that mode='element' is for element screenshots, guiding the user away from deprecated tools. However, it does not explicitly state when not to use or provide alternatives for other scenarios.

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