Skip to main content
Glama

Manage Cookies

manage_cookies
Idempotent

Inspect, clear, save, or load browser cookies to manage session state, preserve logins between runs, or reset website settings during testing.

Instructions

Manage cookies for the current browser session.

Use this tool to inspect, clear, save, or restore browser cookies. Cookie management is useful for inspecting session state, preserving login sessions between browser runs, restoring previously saved sessions, or resetting website state during testing.

Args: action: - "get_all": Return all cookies currently available to the browser, including attributes such as name, value, domain, path, expiry, and security flags. - "clear": Delete all cookies from the current browser session. - "save": Save current cookies to filename. - "load": Load cookies from filename into the current browser session.

filename: The name of the file to save/load cookies from.
    Will be sanitized and saved in a restricted directory.
    Ignored for get_all and clear.

Returns: "get_all": Current browser cookies. "clear": Confirmation that cookies were cleared. "save": Confirmation containing the destination filename. "load": Confirmation containing the source filename.

Security: Cookie data can contain authentication credentials, session identifiers, and other private information. Only inspect, save, load, or share cookies when explicitly authorized.

Notes: Loading saved cookies does not guarantee restoration of a login. Cookies may be expired, invalidated, domain/path restricted, or dependent on other browser state. Navigate to the relevant site when necessary so the browser has the appropriate origin for the cookies.

Tool selection: - Need cookies or authentication cookies -> use this tool. - Need localStorage/sessionStorage -> use manage_storage. - 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoget_all
filenameNocookies.txt

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.5/5.0
Behavior4/5

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

The annotations declare openWorldHint and idempotentHint, but the description adds significant context: it explains that clear deletes all cookies, save/load use a filename, and warns that loading cookies does not guarantee session restoration. It also discloses security considerations about sensitive data, which goes beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Args, Returns, Security, Notes, Tool selection) and is front-loaded with the main purpose. It is somewhat detailed but each section adds necessary value, avoiding unnecessary verbosity.

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?

Given the tool's complexity (four actions, a filename parameter, and security implications), the description covers all critical aspects: action behaviors, return values, security warnings, and caveats about cookie restoration. It lacks an output schema, but the description sufficiently explains expected returns for each action.

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

Parameters4/5

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

With 0% schema coverage, the description fully compensates by defining each possible action enum value and the filename parameter's behavior, including that it is ignored for get_all and clear. This is essential since the schema only lists names and defaults without explanations.

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 identifies the tool as managing browser cookies and enumerates the four specific actions (get_all, clear, save, load). It distinguishes this tool from siblings like manage_storage (localStorage) and run_javascript, making its purpose unambiguous.

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?

The description explicitly lists when to use this tool ('Need cookies or authentication cookies') and when not to, pointing to alternatives such as manage_storage, run_javascript, get_content, and get_attributes. This provides clear guidance for tool selection.

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