take_screenshot
Capture a PNG of the browser session's active tab or a single element to inspect visual layout, styling, or images. Reads the page without changing it; optionally save to a file or capture the full scrollable page.
Instructions
Capture a PNG of the session's active tab, or one element of it, and return it as an image or, with save, as a file path. Use it when visual layout, styling or images matter; use take_snapshot for a cheaper text view of the page's structure, and evaluate to read specific values. fullPage captures the whole scrollable page instead of the visible viewport, which can make a very large image on long pages. It reads the page without changing it. Returns the image plus a caption with its size in bytes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "take_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Save the PNG to a file on the host (under $STATE_DIR/screenshots/, kept after the session closes) and return { path, bytes } instead of the image, for callers that can't take an image (a sandbox) or want the file. Default false. | |
| scale | No | Resize the image by this factor, 0.05 to 4 (e.g. 0.5 for a smaller file). Default 1. | |
| fullPage | No | Capture the whole scrollable page instead of only the visible viewport. Default false. | |
| selector | No | Capture only this element (CSS or `jev:` plain language), scrolled into view. | |
| sessionId | Yes | The id returned by open_browser_session. Errors if no open session has it. |