Skip to main content
Glama

manage_storage

Read or write a key in the current page's localStorage or sessionStorage to inspect or modify browser storage for the active origin.

Instructions

Get or set a key in localStorage or sessionStorage.

Use this tool when the browser workflow needs to inspect or modify JavaScript Web Storage belonging to the current page origin.

Tool selection: - Need localStorage/sessionStorage -> use this tool. - Need cookies or authentication cookies -> use manage_cookies. - Need arbitrary JavaScript or storage operations not covered here -> use run_javascript. - Need visible page content or HTML -> use get_content. - Need an element's HTML attributes -> use get_attributes.

When not to use: - Do not use this tool for HTTP cookies; use manage_cookies instead. - Do not use this tool for arbitrary page JavaScript; use run_javascript when a higher-level tool is insufficient. - Do not use this tool to inspect values from another origin; storage is scoped to the current page origin.

Args: key: Storage key to read or modify.

value: Value to store when action="set". Required for set.

storage: "local" for localStorage or "session" for sessionStorage.

action: "get" to read the key or "set" to write the key.

Returns: The stored value for get, or a confirmation message for set.

Security: Web storage can contain authentication tokens, session identifiers, and other sensitive application state. Only use this tool with trusted sites and authorized MCP clients.

Notes: Storage belongs to the current page origin. Values from one website are not generally available to another origin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
valueNo
actionNoget
storageNolocal

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.0

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and includes return behavior, security warnings about sensitive tokens, and origin scoping. It could more explicitly mention that setting a value overwrites an existing key, but the overall behavior is well disclosed.

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?

The description is well-organized into purpose, selection guidance, parameter explanations, returns, security, and notes. Every section adds useful information, and the structure makes it easy to scan.

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?

Despite having no output schema, the description covers what the tool returns, security considerations, and the important scope-of-origin constraint. This gives an agent enough context to use the tool correctly and safely.

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

Parameters5/5

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

The description explains all four parameters in plain language, including that value is required when action is 'set' and that storage selects local or session storage. This adds meaningful guidance beyond the bare schema titles and enum lists.

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 clearly states the tool's function: 'Get or set a key in localStorage or sessionStorage.' It specifies the resource (web storage), the actions (get/set), and distinguishes this tool from siblings like manage_cookies and run_javascript.

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?

It explicitly says when to use this tool for localStorage/sessionStorage and when not to, naming alternatives such as manage_cookies, run_javascript, get_content, and get_attributes. This gives clear guidance for an agent to select the correct tool.

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