Skip to main content
Glama
JackZhao98

chrome-automation-mcp

by JackZhao98

set_storage

Set cookies, localStorage, and sessionStorage to maintain login sessions in browser automation. Import authentication data from files or cookie strings.

Instructions

🔐 PREFERRED TOOL for setting login state and authentication data. Use this instead of evaluate() to set cookies, localStorage, and sessionStorage to maintain user login sessions across browser automation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo🔗 Optional URL to navigate to in a background tab before setting storage. If provided, opens a new tab (without switching focus), navigates to this URL, and sets storage there. Useful for setting cookies/storage for a specific domain.
domainNo🌐 Default website domain for cookies when not specified individually. Example: 'localhost:3001', 'app.example.com'
cookiesNo🍪 Array of cookie objects for authentication tokens, session IDs, etc.
filePathNoPath to JSON file containing storage data to import
sessionIdYesSession ID to operate ondefault
cookieStringNo🍪 EASY WAY: Raw cookie string copied from browser (document.cookie). Example: 'session_id=abc123; user_token=xyz789; theme=dark'
localStorageNo💾 Persistent browser storage that survives page reloads. Used for user preferences, auth tokens, app state. Example: {'auth_token': 'bearer_xyz', 'user_id': '12345'}
sessionStorageNo🔄 Temporary storage that clears when tab closes. Used for session-specific data. Example: {'temp_data': 'value', 'session_state': 'active'}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.8

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It never says whether existing cookies/storage are overwritten or merged, whether the operation is reversible, what permissions or session state are required, or how errors surface for an 8-parameter mutation tool.

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?

Two tight sentences, front-loaded with the tool's purpose and the preference over evaluate(). 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.

Completeness3/5

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

Parameters are fully documented in the schema, but for a no-annotation mutation tool the description omits overwrite semantics, scope across tabs/sessions, and failure behavior. Adequate but with clear gaps for a tool this complex.

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%, with rich per-field documentation including examples and defaults, so the schema already does the heavy lifting. The description adds no syntax, precedence, or interaction detail (e.g., cookieString vs cookies vs filePath) beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource set (set cookies, localStorage, sessionStorage) and explicitly frames itself as the tool for login/auth state. It differentiates from evaluate(), though that alternative is not among the listed siblings, so differentiation from tools like run_script or get_login is left implicit.

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?

Explicitly says to prefer this over evaluate() for setting login state, which is actionable when-to-use guidance. It stops short of stating when NOT to use it or how it relates to siblings such as get_login or run_script.

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