Skip to main content
Glama

storage.import

Restore cookies and local or session storage from an export payload to recover a logged-in browser session without replaying the login form, or set state piecemeal.

Instructions

Restore storage and cookies, the counterpart to storage.export. Pass a whole export payload as state to put a logged-in session back without replaying the login form, or items/cookies to set state piecemeal.

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": "storage.import"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
itemsNoKey/value pairs to write into one store.
stateNoA whole storage.export payload: localStorage, sessionStorage and cookies restored together.
cookiesNoCookies to restore, as returned by storage.list_cookies or storage.export.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
clear_firstNoClear the store first so the result is exact rather than merged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the write/open-world profile is known. The description adds useful context that this rehydrates an authenticated session, but says nothing about overwriting existing state, merge-vs-replace behavior, or the role of clear_first beyond what the schema states.

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 tight sentence with the core purpose front-loaded and the two usage modes following. No filler or redundant restatement of the name.

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

Completeness4/5

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

For a 7-parameter, zero-required mutation tool with no output schema, the description covers the two main invocation modes and the session-restore intent. Remaining gaps (merge semantics, interaction between clear_first and state) are minor given the rich schema descriptions.

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 86%, so the schema already documents all seven parameters including state, items, cookies and clear_first. The description's parameter discussion largely restates the schema's own wording (whole export payload vs piecemeal), adding little new meaning; baseline 3 applies.

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 ("Restore storage and cookies") and anchors it to a named counterpart, storage.export, so the agent can place it in the family immediately. The second clause distinguishes whole-payload restore from piecemeal writes, which separates it from the set/set_cookie siblings.

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?

Gives concrete when-to-use guidance for each mode: `state` to rehydrate a logged-in session without replaying the login form, `items`/`cookies` for piecemeal writes. It stops short of naming explicit alternatives (e.g. storage.set for a single key) or stating when not to use it.

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