emulate_device
Emulate device viewport and user agent with presets or custom settings for testing responsive design and mobile behavior.
Instructions
Emulate device viewport and UA via preset or custom.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tabId": "<tabId>"
},
"name": "emulate_device"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | Yes | Tab ID | |
| width | No | Custom width (overrides preset) | |
| height | No | Custom height (overrides preset) | |
| preset | No | Device preset | |
| hasTouch | No | Emulate touch events. Default: false | |
| isMobile | No | Emulate mobile device. Default: false | |
| userAgent | No | Custom UA string (overrides preset) | |
| deviceScaleFactor | No | Device scale factor. Default: 1 |