browser_screenshot
Capture the viewport, full page, or a specific element to check visual layout, spacing, alignment, and CSS changes.
Instructions
Capture what the page looks like: the viewport (default), the full scrollable page, or one element (ref/selector). Use it to check visual layout, spacing, alignment, and the result of CSS changes.
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": "browser_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from browser_snapshot, e.g. "e12". Preferred over selector. | |
| scale | No | "css" (default) = 1 image px per CSS px; "device" = full retina resolution. | |
| tabId | No | Tab to act on. Defaults to the tab last opened/selected by an agent, else the active tab. | |
| format | No | Default png; jpeg is much smaller for long pages. | |
| quality | No | jpeg/webp quality (default 80). | |
| fullPage | No | ||
| savePath | No | Also save the image to this file path. | |
| selector | No | CSS selector, "text=Sign in" (visible text), or "xpath=//button". Searches open shadow roots too. | |
| maxHeight | No | Cap full-page height in CSS px (default 12000). |