Skip to main content
Glama
xav-ie

Browser Session MCP

save_browser_state

DestructiveIdempotent

Save session cookies under a name so a future browser session can load them and resume without logging in again.

Instructions

Save the session's cookies under a name so a future session can load them with load_browser_state and resume without logging in again. Call it after a successful login (for example once await_human_takeover completes). Saving under an existing name replaces that state, so use a distinct name per site or account. Only cookies are saved, not localStorage, so sites that keep their login in localStorage won't resume. States are stored on disk as plaintext and include session credentials. Fails on a name with characters other than letters, digits, '.', '_' and '-'.

Input Schema

NameRequiredDescriptionDefault
nameYesName of the saved state: letters, digits, '.', '_' and '-' only.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.

Output Schema

NameRequiredDescriptionDefault
nameYes
savedAtYes
cookieCountYes

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": {
      +    "cookieCount": {
      +      "format": "uint",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "savedAt": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "savedAt",
      +    "cookieCount"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / name / description
      Added value: +"Name of the saved state: letters, digits, '.', '_' and '-' only."
    • addedInput schema / properties / sessionId / description
      Added value: +"The id returned by open_browser_session. Errors if no open session has it."
  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?

Beyond the annotations (destructive/idempotent/openWorld=false), it discloses overwrite-on-existing-name semantics, that only cookies are captured (not localStorage) so some sites won't resume, that states are stored as plaintext credentials, and that invalid names fail — all material facts an agent cannot get from the schema or annotations.

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?

Four compact sentences, front-loaded with the action and purpose, then prerequisites, then caveats. Every sentence carries distinct operational information with no repetition of the schema.

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?

An output schema exists, so return values need not be explained. For a two-parameter state-mutation tool, everything an agent needs — when to call, naming, overwrite risk, coverage limitation, and credential exposure — is present.

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 baseline is 3; the description adds meaning by explaining that 'name' acts as a key whose reuse replaces prior state, and restates the allowed character set — though it does not elaborate on sessionId beyond what the schema already says.

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+resource (save session cookies under a name) plus the payoff (resume without logging in), and explicitly names the complementary sibling load_browser_state so the agent can tell it apart from list_browser_states/delete_browser_state.

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?

Gives concrete triggering conditions ('after a successful login', 'once await_human_takeover completes') and a naming rule ('use a distinct name per site or account'). It also names the follow-up tool that consumes the artifact, leaving nothing to inference.

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