Set Viewport
set_viewportSet a page's viewport width and height to test layouts at specific screen sizes or reproduce responsive display issues.
Instructions
Set viewport dimensions for a page.
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": {
"width": "<width>",
"height": "<height>"
},
"name": "set_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| height | Yes | ||
| pageId | No | Page id. Defaults to the active page. |