ui_start_session
ui_start_sessionStart a browser session to test a UI under selected device, viewport, locale, timezone, or color scheme, and log tool calls into its report. Pass the returned session id to later tools.
Instructions
Start a session bracket: opens a fresh browser context and begins logging subsequent primitive tool calls into a report. A connection can hold several sessions at once (up to MAX_SESSIONS_PER_CONNECTION, default 3): pass the returned session id as session_id to every other tool to choose which session it acts on. A session left unused for 10 minutes is closed automatically and its report is written with status timed_out. Optionally test at the sizes and settings real users have: device (a Playwright device name such as "iPhone 13": mobile user agent, touch, pixel ratio and size), viewport (overrides the device size), colorScheme, locale, timezoneId. With none of them the browser is a 1280x720 desktop. These apply to this session only; use ui_set_viewport to resize mid-flow.
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": {
"target": "<target>"
},
"name": "ui_start_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Playwright device name, e.g. "iPhone 13", "Pixel 7", "iPad Pro 11" | |
| locale | No | Browser locale, e.g. "fr-FR" | |
| target | Yes | Label/URL identifying what this session tests | |
| viewport | No | Page size in CSS pixels (320-3840 x 320-2160), e.g. {width: 375, height: 812} for a phone | |
| timezoneId | No | IANA timezone, e.g. "Asia/Tokyo" | |
| colorScheme | No | prefers-color-scheme the page sees |