Skip to main content
Glama

Restore a session from a file

browser_restore_session
Destructive

Replace the current session with one saved earlier (SessionStore.setBrowserState). WARNING: this REPLACES the windows and tabs that are open now — run browser_save_session first if you might want them back.

Instructions

Replace the current session with one saved earlier (SessionStore.setBrowserState). WARNING: this REPLACES the windows and tabs that are open now — run browser_save_session first if you might want them back. The file must be JSON produced by the save tool; anything else is rejected before the state is touched.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of a file written by browser_save_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description adds critical details beyond them: that open windows and tabs are replaced, and that invalid input is rejected before any state is touched. This tells the agent exactly what is destroyed and when the destructive action actually occurs.

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?

Three sentences with zero waste: the destructive warning is front-loaded and bolded, followed by the prerequisite and validation rule. It is appropriately sized for a single-parameter destructive tool.

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 one-parameter destructive tool with annotations and no output schema, the description covers the action, the danger, the prerequisite, and input validation. Nothing an agent needs to avoid data loss or misuse 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?

Schema coverage is 100%, and the schema already describes 'path' as an absolute path written by browser_save_session. The description reinforces the same constraint ('must be JSON produced by the save tool') but does not add new syntax or format details beyond the schema.

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 and resource: 'Replace the current session with one saved earlier', and names the sibling tool that creates the file. An agent can immediately distinguish this restore operation from browser_save_session or other workspace-oriented siblings.

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?

Explicitly warns to run browser_save_session first if current windows and tabs might be needed, and specifies the accepted file source (JSON produced by the save tool). This gives both the prerequisite and the rejection condition for invalid files.

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