open_browser_session
Start a new isolated Chrome browser session and get its sessionId to pass to every other tool. Each session keeps separate cookies, storage and tabs, and can be named to save a login across tasks.
Instructions
Open a new isolated browser session and return its sessionId; call this first, then pass the id to every other tool. Each session is its own Chrome BrowserContext with separate cookies, storage and tabs, so sessions never see each other, and it starts with one blank tab. Don't open a new session per page: reuse one and use new_page for more tabs. To start logged in, follow with load_browser_state before navigate. Set viewport for a specific window size and useMobileUA to be a phone: a mobile User-Agent and client hints, mobile device metrics (the page's viewport meta applies) and a touch screen (navigator.maxTouchPoints, touch events, pointer: coarse), so sites pick their touch behavior; use tap and swipe on it, and act taps and swipes on its own. Both are fixed for the session's life. Give a name (e.g. github) to keep a login across tasks: opening that name again reuses the session while it is open, and otherwise opens a new one with the login saved under the name, which is saved when a takeover finishes and when the session closes. Sessions persist until close_browser_session, or until the reaper role closes ones idle for MAX_IDLE_HOURS (default 24). Fails if Chrome is unreachable at BROWSER_URL.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "open_browser_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Reuse the open session with this name, or open one with the login saved under it; its login is saved under the name on takeover and close. | |
| device | No | A device preset: its screen size, pixel ratio, User-Agent and, for phones and tablets, a touch screen. `viewport`, `useMobileUA` and `userAgent` override parts of it. | |
| viewport | No | Window size in CSS pixels, { width, height, deviceScaleFactor? }. Default 1280x800 at 1x. | |
| userAgent | No | A User-Agent string to send instead of Chrome's, e.g. a specific phone's; with useMobileUA the session is also a touch phone. A non-Chrome one is sent without Chrome's client hints. | |
| useMobileUA | No | Emulate a phone: a mobile User-Agent and client hints, mobile device metrics and a touch screen. Pair it with a phone-sized viewport such as 390x844. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activeUrl | No | ||
| pageCount | Yes | ||
| sessionId | Yes |