Skip to content

open_session

Kelly Ferrone edited this page Sep 9, 2026 · 7 revisions

open_session

Start a browser session. Do this first.

MCP tool open_session
HTTP POST /browser/open

This is the only place a browser is created, and the only place its settings can be chosen, so it is never done implicitly for you.

Set width and height when layout matters — the headless default is narrow and varies between Grid nodes. page_load_timeout bounds how long a navigation may hang; without one a stuck page holds a scarce Grid slot until the Grid reaps it.

The returned session_id is what a stateless caller passes to every later call. If this server is holding the browser for you, it is returned for information and you should NOT pass it back — read the session://current resource if you are unsure which of the two you are.

Parameters

Name Type Required Default
url string no
width integer no
height integer no
page_load_timeout integer no
script_timeout integer no

Returns

Field Type Notes
session_id string Pass this to every other call.
url string Current URL after the action.
title string Page title after the action.
width integer Window width in use.
height integer Window height in use.
settings object The settings this session actually opened with, after the server default / client default / explicit cascade.

Errors are 400 for a bad argument, 401 without a token, 500 when the Grid refuses. Over MCP the same failures arrive as a tool error.

Example

MCP

open_session()

HTTP

curl -X POST $SELENIUM_FLOW/browser/open \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "session_id": "…"
  }'

← All actions · Installing · Deployment

Clone this wiki locally