Skip to main content
Glama
playwright-mcp-router

playwright-mcp-router

by huangzt

router_close_session

Gracefully close a specific isolated browser session by shutting its Chrome tab group and terminating its worker process; use it when a task is finished to release resources.

Instructions

Gracefully close a specific isolated browser session (closes its Chrome tab group and terminates its worker process). Always close your session when finished.

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": {
      "session": "<session>"
    },
    "name": "router_close_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountNoAccount owning the session (defaults to 'default').default
sessionYesThe session name to close.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 behavioral burden, and it does disclose the two concrete side effects: closing the Chrome tab group and terminating the worker process. It is silent on error behavior for a nonexistent session name, whether in-flight work is lost, and whether the operation 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 tight sentences: the mechanism/parenthetical sits with the purpose sentence and the lifecycle directive is last. Nothing is redundant or padded.

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 two-parameter teardown tool with no output schema and no annotations, the description covers purpose, side effects, and lifecycle policy adequately. Only edge-case behavior (unknown session, partial teardown) is missing, which is minor for this complexity.

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 coverage is 100% and both parameters are already described ('session name to close', account default), so the baseline is 3. The description adds no format, naming convention, or default-account detail beyond what the schema provides.

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 a specific isolated browser session') and the word 'specific' implicitly contrasts it with router_close_all_sessions. The parenthetical clarifies the concrete effect on the tab group and worker process, so the agent knows exactly what is being torn down.

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?

'Always close your session when finished' gives an explicit call-to-action for the normal lifecycle. It does not name router_close_all_sessions as the alternative for bulk cleanup or state when not to use this (e.g., session already gone), so a small amount of routing guidance is left to inference.

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