browser_take_screenshot
Capture a screenshot of the current page or a specific element as PNG, JPEG, or webp. Save viewport or full-page images at CSS or device pixel scale for visual inspection.
Instructions
Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Image format for the screenshot. If unset, inferred from the filename extension, otherwise png. | |
| scale | Yes | Image resolution scale. "css" produces a screenshot sized in CSS pixels (smaller, consistent across devices). "device" produces a high-resolution screenshot using device pixels (larger, accounts for the device pixel ratio). Default is css. | css |
| target | No | Exact target element reference from the page snapshot, or a unique element selector | |
| element | No | Human-readable element description used to obtain permission to interact with the element | |
| session | No | Session id (default "default"). Each session is an isolated browser (own cookies, tabs) that runs in parallel with the others. Created on first use. | |
| filename | No | File name to save the screenshot to. Relative file names are resolved against the workspace root. If not specified, the screenshot is saved into the output directory as `page-{timestamp}.{png|jpeg|webp}`. | |
| fullPage | No | When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots. |