Skip to main content
Glama
xav-ie

Browser Session MCP

open_browser_session

Start an isolated Chrome session with its own cookies, storage and tabs, and get a sessionId to pass to every other browser tool. Reuse one session and add tabs instead of opening new ones.

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 look like a phone; both are fixed for the session's life. 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.

Input Schema

NameRequiredDescriptionDefault
viewportNoWindow size in CSS pixels, { width, height }. Default 1280x800.
useMobileUANoSend a mobile User-Agent and client hints instead of desktop ones. Default false.

Output Schema

NameRequiredDescriptionDefault
activeUrlNo
pageCountYes
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.5
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "properties": {
      +    "activeUrl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "pageCount": {
      +      "format": "uint",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "sessionId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "sessionId",
      +    "pageCount"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / useMobileUA / description
      Added value: +"Send a mobile User-Agent and client hints instead of desktop ones. Default false."
    • addedInput schema / properties / viewport / description
      Added value: +"Window size in CSS pixels, { width, height }. Default 1280x800."
  3. First observedv0.1.2

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare the generic create/side-effect profile (readOnly=false, idempotent=false). The description adds substantial context beyond that: cookie/storage isolation between contexts, a blank starting tab, immutability of viewport and useMobileUA for the session's life, lifetime rules (close_browser_session or reaper closing after MAX_IDLE_HOURS default 24), and a concrete failure mode (Chrome unreachable at BROWSER_URL).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first clause is the action and return value, the next is the mandatory next step, then escaping constraints, then lifetime, then failure. Every sentence carries a rule an agent must act on; nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need no explanation, and the description covers creation semantics, isolation, sequencing, lifetime, and error behavior for a 2-optional-parameter tool. Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented in structured fields. The description nevertheless adds meaning the schema lacks: that viewport and useMobileUA are fixed for the session's entire life, which affects how an agent decides when to set them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Open') and resource ('isolated browser session'), immediately follows with what it returns ('return its sessionId') and what it creates (a separate Chrome BrowserContext). An agent can distinguish it from new_page, list_browser_sessions, and close_browser_session without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit sequencing rules: 'call this first, then pass the id to every other tool', 'Don't open a new session per page: reuse one and use new_page for more tabs', and 'To start logged in, follow with load_browser_state before navigate.' It names the alternatives and the condition that selects each, including a when-not case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.