Skip to main content
Glama
patchright-mcp

patchright-mcp

by quantmew

close

Terminates a specified browser session by ID and optionally deletes its temporary working directory to release resources.

Instructions

Close browser and cleanup resources

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "browserId": "<browserId>"
    },
    "name": "close"
  }
}

Input Schema

NameRequiredDescriptionDefault
browserIdYesBrowser ID to close
cleanupWorkingDirNoRemove temporary working directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/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 behavioral burden. "Cleanup resources" gestures at side effects, but nothing states that closing is irreversible, that the browserId becomes invalid for subsequent calls, or that the temp working directory is deleted by default — the most consequential behavior an agent needs to know.

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?

A single eight-word sentence with the verb front-loaded and no filler. It is efficient, though the terseness pushes detail that matters (irreversibility) into other dimensions.

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 two-parameter, non-read-only lifecycle tool with no output schema and no annotations, the description covers the basic action but omits consequences and sequencing. It is enough to invoke correctly, not enough to invoke safely.

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%; both browserId and cleanupWorkingDir are documented in the schema with a default. The description adds no syntax, format, or conditional meaning beyond that, so the baseline 3 applies.

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?

"Close browser and cleanup resources" names a specific verb (close), the resource (browser), and a secondary effect (resource cleanup). It is clearly distinct in kind from browse/navigate/extract, though it never explicitly contrasts itself with list_browsers or explains the relationship to an existing session.

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 leaving a browser open, no statement that it should be the terminal call for a session, and no mention of what happens if the browser is already closed. The only cue is the imperative verb in the name.

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

Deploy Server

Other Tools