Skip to main content
Glama

browser_state

Manage and debug browser cookies, localStorage, and sessionStorage. Support getting, setting, clearing cookies, and viewing web storage snapshots for troubleshooting authentication and state persistence.

Instructions

查看和管理浏览器状态(Cookie 与 Web Storage)。v1.9.5 起合并 browser_cookies 与 browser_storage。mode=cookies 时支持获取/设置/清除 Cookie;mode=storage 时查看 localStorage、sessionStorage、cookies 快照。调试登录态、Token、状态持久化问题的首选工具。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo工作模式:cookies(Cookie 管理,默认)、storage(Web Storage 快照)cookies
nameNo按名称筛选Cookie(仅 mode=cookies + action=get 时生效)
scopeNoStorage 范围(仅 mode=storage 生效):localStorage、sessionStorage、cookies 或 all,默认 all
actionNoCookie 操作类型(仅 mode=cookies 生效):get(获取Cookie,默认)、clear(清除所有Cookie)、set(设置Cookie)get
cookieNo要设置的Cookie对象(仅 mode=cookies + action=set 时生效),包含 name、value 属性,可选 domain、path、expires 等
domainNo按域名筛选Cookie,如 .example.com(仅 mode=cookies + action=get 时生效)
Behavior4/5

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

No annotations are provided, so the description carries full disclosure burden. It explains both read-only (storage snapshots) and destructive operations (cookie clear/set), and mentions merging behavior. However, it could detail side effects of clearing cookies or snapshot limitations.

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 concise, front-loaded with purpose, and every sentence provides essential information without redundancy. It efficiently conveys the merged nature, dual modes, and primary use case.

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?

Given the tool's complexity (6 parameters, nested objects, dual modes) and absence of an output schema, the description is minimally adequate. It covers modes and actions but lacks details on return values, error handling, or browser context limitations.

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%, so baseline is 3. The description summarizes the mode-based behavior but does not add significant new meaning beyond the schema descriptions. It provides general-purpose context but not parameter-specific enhancements.

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 it manages browser state (Cookies & Web Storage), explicitly mentions merging legacy tools, and explains two modes with specific actions. It effectively distinguishes itself from sibling legacy tools like browser_cookies and browser_storage.

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?

The description provides clear context: it's the preferred tool for debugging login state, tokens, and persistence issues, and explains when to use each mode. However, it lacks explicit exclusions or comparison with other tools like browser_snapshot or browser_har_export.

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/validpilot/ai-verify-mcp'

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