page.set_viewport
Resize the emulated browser viewport to a set width, height, and scale, or enable mobile emulation for testing responsive layouts on a specific page or browser.
Instructions
Resize the emulated viewport. See device.preset for realistic device profiles.
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": "page.set_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reset | No | ||
| width | No | ||
| height | No | ||
| 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. | |
| device_scale_factor | No |