Skip to main content
Glama
andresolbach

nodriver-mcp-server

Set localStorage

set_local_storage
Idempotent

Set feature flags, consent state, or auth tokens in the page's localStorage. Merges with existing values; navigate to the target site first, then reload after writing.

Instructions

Write entries into the current page's localStorage.

Merges into what is already there rather than clearing it. Handy for setting feature flags, consent state or auth tokens before the page's own scripts read them.

localStorage is scoped per origin, so navigate to the site first — writing on about:blank goes nowhere. Most pages read these values only at startup, so reload after setting them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesKey-value pairs to write, e.g. {"token": "abc", "locale": "de"}. Values must be strings — JSON-encode anything structured yourself.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Beyond the annotations (idempotentHint=true, destructiveHint=false), the description clarifies that it merges rather than clears, and warns about origin scoping and page startup reads. This adds useful behavioral context. It does not contradict the annotations, though it could be slightly more explicit about overwriting existing keys.

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 short paragraphs, each carrying weight: purpose, merge semantics/use case, and critical scoping/reload caveats. No fluff, front-loaded with the main action, and structured for quick skimming.

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 simple one-parameter tool, the description covers the necessary operational context: origin scoping, prerequisite navigation, and the reload step. The existence of an output schema reduces the need to describe return values. The guidance is complete enough for reliable use.

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 schema already provides 100% coverage for the single 'items' parameter, including an example and the string-value constraint. The description does not add further parameter-level detail, so the 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 clear verb and resource: 'Write entries into the current page's localStorage.' This immediately distinguishes the tool from its sibling 'get_local_storage' (read vs. write) and from cookie-related tools. It is specific about the action and target.

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?

Provides practical guidance: 'Handy for setting feature flags, consent state or auth tokens,' and explains the need to navigate to the site first and reload after setting. It implies when to use the tool but does not explicitly compare it against alternatives like set_cookie or get_local_storage, so it misses the full 'when-not' context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andresolbach/nodriver-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server