Skip to main content
Glama
ChristofMilius

mcp-agent-playwright

browser_tab_close

Close the active browser tab, or specify a tab index to close a different one.

Instructions

Close a browser tab. Defaults to the active tab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. The description states that it 'Defaults to the active tab,' which is a behavioral detail, and the parameter schema clarifies that omitting index closes the active tab. However, it doesn't disclose other relevant behaviors, such as what happens when the last tab is closed, whether the browser exits, or how the tab index is validated (e.g., what if index is out of range). For a destructive operation like closing a tab, more transparency would be beneficial.

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?

The description is two short sentences, both of which are essential. It front-loads the core action and immediately clarifies the default behavior. There is no redundancy or unnecessary detail; every word earns its place. This is an example of concise, efficient writing.

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?

Given the simplicity of the tool (1 optional parameter, no nested objects) and that an output schema exists, the description is fairly complete for basic usage. However, it lacks context on edge cases (e.g., closing the last tab, invalid index) or interaction with sibling tools. For a destructive tool, an agent might need to know these behaviors, but for simple tab close, this is adequate.

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?

The schema has 1 parameter, but schema_description_coverage is 0% because the parameter 'index' has a description. However, the parameter description is minimal ('Tab index to close; omit to close the active tab.'). The tool's description adds the 'defaults to active tab' behavior, which complements the schema. Since there's only one parameter and the schema already explains it, the description adds little beyond reinforcing the default behavior. A score of 3 is appropriate as the schema is sufficient but not richly detailed.

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 clearly states a specific verb ('Close') and resource ('browser tab'), and specifies the default behavior (active tab). It is concise and unambiguous, though it doesn't explicitly contrast with sibling tools like browser_tab_switch or browser_tab_new. The name itself is fairly descriptive, but the description adds the key 'defaults to active tab' detail, which is not in the name.

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?

The description implies usage by stating it closes a tab and defaults to the active tab, but it doesn't explicitly state when to use this tool versus alternatives like browser_tab_switch (to switch tabs) or browser_tab_new (to open a tab). For an agent, the context of closing is clear, but there is no guidance on selection among siblings, such as 'use browser_tab_switch to switch tabs'.

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