Skip to main content
Glama

ui_screenshot

Capture specified DOM elements or viewport regions as size-limited base64 screenshots. Locate targets using CSS, ARIA, XPath, or text, with frame support for iframes.

Instructions

截取指定 DOM 元素或顶层 viewport 区域并返回受限大小的图像。

元素定位顺序与 ui_interact 相同:CSS → AX role/name/description → XPath → text/placeholder。frame 未指定时优先活动 iframe。若没有可用定位器,可传 x/y/width/height 使用顶层 viewport CSS 像素矩形;截图不会静默把 iframe 内坐标 当成顶层坐标。结果包含 base64 图像、裁剪框、frame、定位来源和摘要哈希。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNo
yNo
cssNo
nameNo
roleNo
textNo
frameNo
widthNo
xpathNo
heightNo
paddingNo
qualityNo
in_iframeNo
max_bytesNo
timeout_msNo
descriptionNo
placeholderNo
image_formatNopng

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations exist, so the description carries the full burden. It discloses the locator precedence, iframe priority, top-level coordinate semantics, and the exact result fields (base64, crop box, frame, locator source, hash). This is strong transparency, although it omits behavior around size limits or timeouts.

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?

Four compact sentences, each carrying useful information; the main purpose is front-loaded and technical details follow in a logical order. No filler.

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?

For an 18-parameter tool with no annotations, the description covers the central selection logic and result shape, but it under-documents several input parameters and the interaction with siblings. The output schema presumably covers return values, so some completeness is recovered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, so the description must compensate. It explains the core locator parameters (css, role, name, description, xpath, text, placeholder) and the x/y/width/height rectangle fallback, but it leaves many parameters (image_format, quality, max_bytes, padding, timeout_ms, in_iframe) undescribed.

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 opens with a clear verb and scope: capturing a DOM element or top-level viewport region and returning a resized image. It also outlines the locator fallback order, but it does not explicitly differentiate from sibling tools like ui_snapshot, so 4.

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?

The description explains how element locators work and when to fall back to x/y/width/height, but it never states when to choose this tool over related siblings (e.g., ui_snapshot, overlay_scan). No explicit alternatives or exclusions are provided.

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/hooplus1ce/Qa-Automation-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server