Skip to main content
Glama
ImadMoka

playwright-mcp-supercharged

by ImadMoka

session_import_cookies

Destructive

Import cookies from Chrome into a browser session to access sites where the user is already logged in. Specify a domain to authenticate without passwords.

Instructions

Import cookies from the user's real Chrome browser into a session. Decrypts cookies from Chrome's encrypted database on macOS. Use this to access sites the user is already logged into. After importing, navigate to the site. If a captcha appears, the user must complete it in the visible browser window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to import cookies for (e.g. "shopify.com", "github.com"). Matches any cookie whose domain contains this string.
sessionIdNoTarget session ID. Omit to use the active session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare destructive/openWorld/readOnly=false, and the description adds meaningful context beyond them: platform constraint (macOS decrypt), and the required user interaction ('If a captcha appears, the user must complete it in the visible browser window'). It stops short of saying whether existing session cookies are overwritten.

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?

Four short sentences, each earning its place: what it does, the platform mechanism, when to use it, and the operational caveat. Purpose is front-loaded before workflow and caveats.

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?

For a mutating, no-output-schema tool, the description covers mechanism, prerequisite platform, and the captcha failure path. It omits edge cases such as keychain prompts, locked Chrome DBs, or how imported cookies interact with an existing session's cookies.

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 both 'domain' (substring matching) and 'sessionId' (default to active session) fully documented in the schema. The description adds no parameter-level detail beyond that baseline.

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?

States a specific verb+resource ('Import cookies from the user's real Chrome browser into a session') and adds the mechanism (decrypts Chrome's encrypted DB on macOS). This is clearly distinguishable from sibling session tools like session_create or browser_navigate.

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?

Gives explicit conditions ('Use this to access sites the user is already logged into') and the follow-up workflow ('After importing, navigate to the site'). It does not, however, name an alternative or state when NOT to use it (e.g., versus logging in manually via browser_type).

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