Skip to main content
Glama
Playwright MCP Server

Playwright MCP Server

by sohitmahato

playwright_close

Closes the active browser instance to release resources and end the browser automation session after scraping, testing, or automation tasks.

Instructions

Close the browser instance

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "playwright_close"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden, and "close the browser instance" reveals very little beyond the operation itself. It does not state that this tears down all open pages and session state irreversibly, whether recorded state or screenshots are affected, or whether a subsequent navigate call would relaunch a browser.

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?

A single seven-word sentence with the action verb front-loaded and zero filler. Nothing in it is redundant or misplaced.

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?

For a zero-parameter lifecycle tool, the definition is minimally adequate: an agent knows what it does, but with no annotations and no output schema it has no signal about irreversibility, side effects on other tool state, or the result of the call. A sentence on what is destroyed and whether the browser can be relaunched would close the gap.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate and the baseline of 4 applies. The empty schema is consistent with the description's implicit claim that closing requires no configuration.

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?

The description names a specific verb and resource ("Close the browser instance"), which clearly separates it from the sibling action tools like playwright_click or playwright_navigate. It stops short of distinguishing browser-level teardown from page-level or context-level closing (e.g., playwright_reload, playwright_go_back), but the core purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to call this versus simply navigating elsewhere, nor any note about prerequisites such as whether a browser must already be open. The agent must infer all usage conditions from the name alone.

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