Skip to main content
Glama
andresolbach

nodriver-mcp-server

Load session

load_session

Restore cookies and localStorage from a saved session to start already logged in, skipping expired cookies and reporting restored count.

Instructions

Restore cookies and localStorage from a saved session file.

Use it at the start of a run to arrive already logged in. The page is first navigated to the saved origin so localStorage lands where it belongs, then reloaded so the restored cookies take effect.

Cookies that no longer apply are skipped rather than failing the whole restore, and the response reports how many were actually restored. Expired tokens still leave you logged out, so check the page afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
browserNoWhich browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.default
filenameYesSession filename as shown by list_sessions, or an absolute path to a session JSON file.
restore_pagesNoAlso re-open the tabs that were open when the session was saved. Default false, which restores only cookies and localStorage.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • addedInput schema / properties / browser
      Added value: +{
      +  "default": "default",
      +  "description": "Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.",
      +  "type": "string"
      +}
  2. First observedv1.7.2

TDQS

A4.4/5.0
Behavior5/5

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

The description discloses several behavioral nuances beyond the annotations: it navigates to the saved origin, reloads the page, skips invalid cookies instead of failing, and reports how many were restored. It also notes that expired tokens still leave the user logged out. These details are not present in the annotations (which only set readOnlyHint=false, destructiveHint=false, etc.) and provide essential context for the agent about side effects and limitations.

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

Conciseness4/5

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

The description is slightly long (about four sentences) but each sentence adds value: purpose, usage context, process, and behavioral caveats. The most important information is front-loaded, and there is no fluff. It earns a 4 for being well-organized and efficient, though not as terse as the highest tier.

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?

For a tool with an output schema and complex side effects (navigation, reload, selective restoration), the description covers all critical aspects an agent needs to know: what to do, how it works, what to expect (count of restored cookies), and potential failure modes (expired tokens). It also implicitly addresses prerequisites by referencing saved sessions and list_sessions. Nothing essential is missing.

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?

The input schema already describes all three parameters with full coverage (100%), so the description doesn't need to add parameter-level detail. It does reinforce the 'filename' parameter by mentioning it as shown by list_sessions, and the browser parameter is already explained in the schema. However, the description doesn't add significant meaning beyond the schema, so a baseline score of 3 is appropriate.

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?

The description opens with a precise verb and resource: 'Restore cookies and localStorage from a saved session file.' It also states the intended purpose ('arrive already logged in') which distinguishes it from sibling tools like save_session, get_cookies, or set_cookie. The behavior is clearly scoped to session restoration, making it easy to identify when to use.

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

Usage Guidelines4/5

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

The description explicitly recommends using this tool 'at the start of a run to arrive already logged in,' giving clear when-to-use guidance. It also warns about expired tokens and advises checking the page afterward. It does not explicitly name alternative tools for other scenarios, but the context is sufficient for an agent to infer that this is for restoring a saved session rather than setting individual cookies or storage values.

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