Skip to main content
Glama
andresolbach

nodriver-mcp-server

Save session

save_session

Persist cookies, localStorage, and open page URLs to a reusable JSON file so a later run can restore the login and skip authentication.

Instructions

Save cookies, localStorage and open page URLs to a reusable file.

This is how you keep a login obtained interactively, so a later run can skip the login flow entirely — restore it with load_session.

Stored as JSON under ~/.nodriver-mcp/sessions/. That file holds live session tokens in plain text, so treat it as a credential.

Only the current page's origin contributes localStorage. For a login meant to survive without an explicit restore step, a persistent profile (create_profile + use_profile) is the sturdier option.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesA human-readable name for this session, e.g. "github-logged-in". It forms the filename, with a timestamp appended so repeated saves never overwrite one another.
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

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
Behavior4/5

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

Annotations already declare this is a non-read-only, non-idempotent write, and the description adds meaningful behavior beyond that: files are stored as JSON under ~/.nodriver-mcp/sessions/, contents are plain-text credentials, and only the current page's origin contributes localStorage. No contradiction with annotations.

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 main purpose is front-loaded in the first sentence, and each following paragraph earns its place by covering restoration, storage location, security sensitivity, and when a persistent profile is preferable. It is slightly longer than strictly necessary but remains focused.

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?

Given the output schema exists, return-value documentation is unnecessary. The description covers what is saved, where it is stored, how to restore it, the localStorage origin limitation, and a more robust alternative, making the tool safe and easy to invoke correctly.

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 the schema already documents both name and browser. The description adds useful context about the credential-sensitivity of the saved file but does not need to compensate for schema gaps.

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 first sentence names a specific action and resource: save cookies, localStorage, and open page URLs to a reusable file. It also distinguishes itself from related tools by pointing to load_session for restoration and to persistent profiles as the sturdier alternative.

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?

The description explicitly explains when to use it — preserving an interactively obtained login so a later run can skip the login flow — and names the restore counterpart, load_session. It also gives an alternative condition: for logins that must survive without an explicit restore step, use create_profile + use_profile.

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