Skip to content

end_browser

Kelly Ferrone edited this page Sep 10, 2026 · 1 revision

end_browser

Quit the browser and free its Grid slot. Do this when finished.

MCP tool end_browser
HTTP POST /browser/end

Ends the browser, not your session. The session keeps the browser choice and the page you were on, so a later open_session() with no arguments picks up exactly where this left off — and any files the browser had are gone with it, because the Grid keeps them per browser.

Call it on failure paths too. Browsers are scarce and an abandoned one holds a Grid slot until it is reaped. Omit session_id to end the one this client has been using.

Parameters

Name Type Required Default Notes
session_id string yes over HTTP The session_id returned by /browser/open. Required here.

Returns

Field Type Notes
success boolean
session_id string

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

end_browser()

HTTP

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

← All actions · Installing · Deployment

Clone this wiki locally