Set Viewport
set_viewportChange viewport dimensions mid-session and enable mobile emulation with touch events and user agent to test responsive layouts, breakpoints, and mobile UI.
Instructions
Change viewport size mid-session. mobile=True triggers touch events + UA. For mobile UI / breakpoint reveal.
Ex: set_viewport('t0', 375, 667, mobile=True) → {"width":375,"height":667}
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": {
"tab_id": "<tab_id>",
"width": "<width>",
"height": "<height>"
},
"name": "set_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| height | Yes | ||
| mobile | No | ||
| tab_id | Yes | ||
| device_scale_factor | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||