device.viewport
Set an exact viewport size, device pixel ratio, mobile flag, and touch emulation to test responsive layouts and mobile behavior in a controlled browser session.
Instructions
Set an exact viewport, device pixel ratio, mobile flag and touch emulation.
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": "device.viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| touch | No | ||
| width | Yes | ||
| height | Yes | ||
| mobile | No | ||
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. | |
| user_agent | No | ||
| orientation | No | ||
| device_scale_factor | No |