Show the page at another width
set_viewportHolds the page at a phone, tablet, or desktop width so later audits, maps, and measurements target that viewport; reset restores the page’s real size.
Instructions
Holds the page at a phone, tablet or desktop width, and leaves it there. Every tool afterwards, including the numbered map, the accessibility audit and the measurements, then answers about that width, which is how you find what is wrong at 375px rather than just noticing that something is. Call it with reset to give the page back. Chrome shows a debugging banner while this is held; that is Chrome, not the page.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "set_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reset | No | Hand the page back at its real size. | |
| width | No | ||
| height | No | ||
| preset | No | 375, 768 or 1440. |