Skip to main content
Glama
playwright-ui-mcp

playwright-ui-mcp

by ailabs-393

browser_close_page

Close a specific browser page or tab using its page ID to manage open pages during Playwright UI automation and visual verification.

Instructions

Close a specific page/tab

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": {
      "pageId": "<pageId>"
    },
    "name": "browser_close_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdYesThe page ID to close

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 behavioral burden, yet it says nothing about side effects: whether page state is permanently lost, what happens if pageId is invalid or already closed, whether the active/focused page changes, or whether the browser itself stays open. For a destructive operation this is a meaningful gap.

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 front-loaded sentence with no filler; the verb and scope come first. It is efficient, though its brevity is partly what leaves behavioral questions unanswered.

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 one-parameter tool with a fully documented schema and no output schema, the description covers the core action adequately. It remains incomplete on side effects and on differentiation from browser_close, which an agent needs before invoking a close operation.

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 the single pageId parameter is documented in the schema as "The page ID to close", so there is no uncovered parameter. The description adds no meaning beyond that (e.g., how to obtain a pageId, format expectations), so the baseline of 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 a specific page/tab" states a clear verb (close) and resource (page/tab) with scope narrowed by "specific", which distinguishes it from the whole-browser browser_close sibling. It stops short of naming that sibling explicitly, but the scope 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 Guidelines3/5

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

Usage is only implied by the word "specific": the agent can infer this closes one tab rather than the browser, but the description never says when to prefer it over browser_close or what preconditions exist. No explicit when/when-not guidance is given.

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