browser_screenshot
Captures the visible area of the current Chrome tab as a base64 PNG or saves it to a specified path. Use it to inspect on-screen content and get viewport details needed for coordinate-based clicks.
Instructions
Take a screenshot of the visible area of the current tab. Returns base64 PNG, or saves to disk if path is provided. The image is in device pixels; when Chrome reports them in time, the answer also gives the CSS viewport size and devicePixelRatio, which browser_click_xy coordinates need. Chrome stays where it is: if its window is covered by other windows, there is no picture and the answer is error "window-covered".
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 |
|---|---|---|---|
| path | No | File path inside the working directory to save the screenshot to (e.g. screenshots/page.png). It must end in .png (the screenshot is PNG data) and stay inside the working directory (also through links), and an existing file is not replaced unless overwrite is true; all of it is checked before the screenshot is taken. | |
| overwrite | No | Replace an existing image file at path (default: false) | |
| partition | No | Run this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead. | |
| bring_to_front | No | Raise Chrome in front of the user if its window is covered, and leave it there. Takes the user's screen: only after the user agreed (browser_ask_user). Default false. |