setViewport
Adjust browser viewport width and height to test responsive layouts on various screen sizes, with optional device pixel ratio.
Instructions
Change viewport dimensions. Test responsive layouts across screen sizes.
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": "setViewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | Width px | |
| height | Yes | Height px | |
| deviceScaleFactor | No | Pixel ratio (default: 1) |