Browser Set Viewport
browser_set_viewportUse this to change an inspected Chromium tab viewport width, height and optional mobile scale for responsive testing. It changes browser emulation, not the host monitor resolution.
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": {
"device": "<device>",
"width": "<width>",
"height": "<height>"
},
"name": "browser_set_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Choose a page whose title contains this text. | |
| width | Yes | CSS viewport width for set_viewport. | |
| device | Yes | ReMCP device id returned by list_devices. Required for every device operation. | |
| height | Yes | CSS viewport height for set_viewport. | |
| mobile | No | Enable mobile emulation for set_viewport. | |
| endpoint | No | Loopback Chrome DevTools endpoint. Defaults to REMCP_CDP_URL or http://127.0.0.1:9222. | |
| target_id | No | Page target id returned by browser_tabs. | |
| timeout_ms | No | Timeout in milliseconds. | |
| url_contains | No | Choose a page whose URL contains this text. | |
| device_scale_factor | No | Device scale factor for set_viewport; default 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Browser element action structured result for browser_action. Stable fields are declared explicitly; platform-specific fields may be added. Large results may return truncated/bytes/preview instead of the full payload. | |
| text | Yes | Concise human-readable result of the tool call. |