ui_set_viewport
ui_set_viewportResize the current page viewport to test phone, tablet, or desktop layouts; recheck page state afterward to capture responsive layout changes.
Instructions
Resize the current page's viewport (320-3840 x 320-2160 CSS pixels), e.g. 375x812 for a phone or 768x1024 for a tablet. Layouts can change when the page is resized, so call ui_get_page_state again afterwards.
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": "ui_set_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | Width in CSS pixels | |
| height | Yes | Height in CSS pixels | |
| session_id | No | Which open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open. |