take_screenshot
Captures a page or specific selector as a screenshot, returning base64 data, image content, or a saved file, and maps image pixels to page coordinates when needed.
Instructions
Screenshot the page or selector: base64 in the JSON (output data, default), image content (image), or a file (file, or path). cssRect and scale convert image pixels to x, y.
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": "take_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute, ending in .png, .jpg, .jpeg, .webp; default a temp file. | |
| format | No | Default png; must match path's extension. | |
| output | No | Default data; file when path is given. | |
| selector | No | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b | |
| overwrite | No | Replace an existing file. | |
| sessionId | No |