Skip to main content
Glama

browser_close_tab

Closes a specified browser tab by index, preserving the session. Refuses to close the last remaining tab.

Instructions

Close ONE tab by index (from browser_tabs) without closing the session. If you close the tab currently being driven, the session heals onto another live tab. Refuses to close the last remaining tab — browser_close the whole session for that. Handy to drop a finished game's tab, or to close the opener so the game tab is the only one left.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
sessionIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that only one tab is closed, the session remains open, closing the driven tab triggers healing onto another live tab, and the tool refuses to close the last tab. This is substantive behavior beyond what the schema shows.

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?

Three sentences, each earning its place: the core operation is front-loaded, the healing behavior is stated, and the refusal rule routes to the correct sibling. There is no fluff or repetition of schema details.

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 single-tab close operation with no annotations and no output schema, the description is nearly complete: it covers scope, session behavior, edge-case refusal, and alternatives. It only omits explicit handling of invalid indices or mention of the optional sessionId parameter, but the core calling context is well covered.

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 0% description coverage, so the description must compensate. It does clarify that index refers to a tab position from browser_tabs, but it never mentions the optional sessionId parameter, leaving that parameter's semantics to inference.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Close ONE tab by index (from browser_tabs) without closing the session.' It clearly distinguishes this tool from browser_close by stating it does not close the session and names browser_tabs as the source of the index, so an agent can tell it apart from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

It gives explicit use cases: 'drop a finished game's tab' or 'close the opener so the game tab is the only one left.' It also states when not to use it and points to the alternative: 'Refuses to close the last remaining tab — browser_close the whole session for that.'

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