browser_viewport
Check responsive layouts in the current agent tab. Set phone, tablet, desktop presets or custom CSS pixel sizes; emulate color scheme, reduced motion, forced colors, or offline, then restore.
Instructions
Check a responsive layout in the current agent-owned tab. action=set with preset phone (390x844), tablet (768x1024) or desktop (1365x768), or width and height in CSS pixels, resizes the real browser window so the page reflows as it would on that screen (Linux; elsewhere the window keeps its size). action=restore returns to the launch size and clears emulation; call it when the check is done. action=get reads the current size. action=emulate sets color_scheme (light or dark), reduced_motion, forced_colors or offline. A successful set or restore includes a fresh page snapshot; earlier element positions are stale after a resize, so use the new refs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | emulate: clear all emulation. | |
| width | No | set only, without preset: requested page-content width in CSS pixels. | |
| action | Yes | get reads size and emulation; set applies a preset or width and height; restore returns to dynamic sizing and clears emulation. | |
| height | No | set only, without preset: requested page-content height in CSS pixels. | |
| preset | No | set only: the live view's profile sizes, phone 390x844, tablet 768x1024, desktop 1365x768. | |
| tab_id | Yes | The current agent-owned browser tab whose shared native window is targeted. | |
| offline | No | emulate: fail every request in this browser context. | |
| color_scheme | No | ||
| forced_colors | No | ||
| reduced_motion | No |