browser_toggle_device
Toggle the current browser page between desktop and mobile device emulation instantly. Use Playwright device names or custom metrics to switch viewport size, touch, orientation, and user agent.
Instructions
Toggle the current browser page between desktop and mobile device emulation without recreating the browser context. Uses Playwright device descriptors and Chromium CDP for dynamic mobile metrics, touch, device scale factor, orientation, and user agent. On Firefox/WebKit only viewport resizing is available. Omit enabled to toggle the current state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| device | No | Playwright device name such as Pixel 7, iPhone 13, or iPad Mini. Desktop disables emulation. | |
| height | No | ||
| reload | No | Reload after applying emulation so subsequent requests use the new user agent. | |
| enabled | No | Enable mobile emulation when true, restore desktop mode when false. Omit to toggle. | |
| hasTouch | No | ||
| userAgent | No | ||
| orientation | No | ||
| deviceScaleFactor | No |