Skip to main content
Glama
ImadMoka

playwright-mcp-supercharged

by ImadMoka

session_create

Destructive

Create a new browser session, optionally connecting to a running Chrome via cdpEndpoint to reuse existing cookies and logins, or launching a fresh isolated browser.

Instructions

Create a new browser session. Pass cdpEndpoint to connect to a running Chrome with existing cookies/logins (e.g. "http://localhost:9222"). Without cdpEndpoint, launches a fresh isolated browser.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesUnique identifier for the new session
cdpEndpointNoChrome DevTools Protocol endpoint to connect to a running Chrome (e.g. "http://localhost:9222"). Inherits all cookies and logged-in sessions.
cookiesFileNoPath to a JSON file containing cookies to load (Playwright addCookies format). Use to import logged-in sessions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=true, so the safety profile is covered; the description usefully adds the isolation semantics (fresh isolated browser vs. inheriting cookies/logins from an external Chrome). It does not explain why this create operation carries destructiveHint=true or what happens to an existing session with the same sessionId.

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 sentences, front-loaded with the action and then the mode branch, with an inline example. No filler or repetition.

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 no-output-schema creation tool the description covers the essential decision (attach vs. fresh launch) and points at a real endpoint format. It leaves the cookiesFile path and the lifecycle relationship to session_close largely unaddressed, which an agent would need for full confidence.

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%, so all three parameters are already documented, and the description's cdpEndpoint explanation largely restates the schema's own 'inherits all cookies and logged-in sessions' note. cookiesFile is not mentioned in the description at all, so it adds little beyond the structured fields.

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 ('Create a new browser session') and adds the two operating modes, so the tool is easy to place among the browser_* action tools. It does not, however, differentiate itself from the potentially overlapping sibling session_import_cookies, which also touches session bootstrapping with cookies.

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 conditional guidance: pass cdpEndpoint to attach to a running Chrome with existing logins, omit it to launch a fresh isolated browser, with a concrete localhost example. It is silent on the third mode (cookiesFile) and on when to prefer session_import_cookies over passing cookies at creation time.

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