Skip to main content
Glama

browser_import_session

Restore browser cookies, localStorage, and sessionStorage from a JSON file or session data object so automated sessions retain prior login and state.

Instructions

Import session state (cookies, localStorage, sessionStorage) into the browser.

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": "browser_import_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoPath to session JSON file
session_dataNoSession data dictionary if path is not used

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden but only says what is imported. It omits critical mutation semantics: whether existing cookies/storage are overwritten or merged, which origin/domain the state applies to, whether it affects only the current tab or the whole browser context, and what errors occur on malformed input.

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?

A single, front-loaded sentence with zero waste that names the resource and the state categories. Nothing redundant or bloated.

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

Completeness2/5

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

For a state-mutating tool with no annotations and no output schema, the description is too thin. It does not explain overwrite behavior, scope (tab vs context), expected session JSON shape, or the interaction between path and session_data, leaving an agent unable to predict side effects.

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

Parameters3/5

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

Schema description coverage is 100%, so both optional parameters are already documented in the schema; the baseline of 3 applies. The description adds the categories of state being imported but does not add syntax, format, or precedence details beyond what the schema provides.

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

Purpose4/5

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

States a specific verb (import) and resource (session state), and enumerates the state types covered: cookies, localStorage, sessionStorage. It is distinguishable from browser_export_session by direction, though it doesn't explicitly contrast with siblings like browser_set_cookie or browser_clear_storage.

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

Usage Guidelines2/5

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

The description gives no when-to-use guidance, no prerequisites (e.g., whether a page/tab must be open), and no explanation of when to prefer this over browser_set_cookie or browser_get_storage. It also does not clarify the intended choice between the path and session_data parameters.

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

Deploy Server

Other Tools