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、定位来源和摘要哈希。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ui_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| css | No | ||
| name | No | ||
| role | No | ||
| text | No | ||
| frame | No | ||
| width | No | ||
| xpath | No | ||
| height | No | ||
| padding | No | ||
| quality | No | ||
| in_iframe | No | ||
| max_bytes | No | ||
| timeout_ms | No | ||
| description | No | ||
| placeholder | No | ||
| image_format | No | png |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||