Skip to main content
Glama
playwright-ui-mcp

playwright-ui-mcp

by ailabs-393

browser_close

Closes the Playwright browser and deletes captured screenshots and recordings to clean up after UI analysis. Call it when finished to prevent leftover artifacts.

Instructions

Close the browser and clean up all screenshots/recordings. IMPORTANT: Always call this when done with UI analysis to ensure proper cleanup.

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": "browser_close"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the destructive side effect of wiping screenshots/recordings, which is real value beyond a bare name. However, it omits other behavioral facts an agent needs: whether it errors if no browser is running, whether session/auth state is lost, and whether it is idempotent.

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 short sentences, with the action front-loaded and the cleanup obligation emphasized second. No filler or redundant restatement of the name.

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 zero-parameter teardown tool with no output schema, the definition covers the essential action and the required usage trigger. It falls short only on edge-case behavior (calling when no browser is open, error modes), which is minor but not fully covered given the absence of annotations.

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 no parameters, so the schema is empty and there is nothing for the description to clarify. The baseline of 4 applies; the description correctly implies a no-argument call.

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: "Close the browser" plus the side effect of cleaning up screenshots/recordings. It is clear what the tool does, but it never explicitly distinguishes itself from the sibling browser_close_page, so an agent must infer that this closes the whole browser rather than one tab.

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 when-to-use guidance: "Always call this when done with UI analysis to ensure proper cleanup," which is a clear call-to-action trigger. It does not name an alternative or describe when NOT to call it (e.g., mid-session or when only closing a tab), leaving that inference to the agent.

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