Set the page viewport
browser_set_viewportSet or clear a persistent BiDi viewport override to control page dimensions and screenshot resolution, then read back the result.
Instructions
Set (or clear) the BiDi viewport override and read back the result. The override PERSISTS across sessions and changes screenshot resolution (screenshots are physical pixels: viewport x devicePixelRatio), so clearing it matters. Measured: clearing works by sending viewport=null and OMITTING devicePixelRatio; sending null for both times out, so this tool never does that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Remove the override (sent as viewport=null with devicePixelRatio omitted) | |
| width | No | Viewport width in CSS pixels | |
| height | No | Viewport height in CSS pixels | |
| context | No | Tab context id (default: the active tab) | |
| devicePixelRatio | No | Device pixel ratio override |