browser_take_screenshot
Capture page or element screenshots in PNG or JPEG format using Playwright MCP Server. Specify viewport, full page, or target element for precise image capture.
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 |
---|---|---|---|
element | No | Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too. | |
filename | No | File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified. | |
fullPage | No | When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots. | |
ref | No | Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too. | |
type | No | Image format for the screenshot. Default is png. | png |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"element": {
"description": "Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.",
"type": "string"
},
"filename": {
"description": "File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified.",
"type": "string"
},
"fullPage": {
"description": "When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.",
"type": "boolean"
},
"ref": {
"description": "Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.",
"type": "string"
},
"type": {
"default": "png",
"description": "Image format for the screenshot. Default is png.",
"enum": [
"png",
"jpeg"
],
"type": "string"
}
},
"type": "object"
}