Skip to main content
Glama

browser.close_tab

Destructive

Close a specific browser tab by its index to reduce tab clutter during automated workflows.

Instructions

Close one tab index if more than one tab is open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesZero-based index of the target tab, as reported by browser.list_tabs.
session_idNoTarget session id, from browser.create_session or browser.list_sessions. Optional when exactly one session is live; observe and act tools create one when none is.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.1
  2. Removedv1.4.2
  3. Changed2 schema fields changedv1.4.2
    • addedInput schema / properties / index / description
      Added value: +"Zero-based index of the target tab, as reported by browser.list_tabs."
    • addedInput schema / properties / session_id / description
      Added value: +"ID of the target browser session, as returned by browser.create_session or listed by browser.list_sessions."
  4. Changed3 schema fields changedv1.0.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / session_id / maxLength
      Added value: +120
    • addedInput schema / properties / session_id / minLength
      Added value: +1
  5. First observedv0.5.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description's 'Close' action aligns with those. The description adds the guardrail that it only works when more than one tab is open, which is useful behavioral context. However, it doesn't disclose what happens if the index is invalid or if only one tab is open, nor does it mention whether the active tab changes after closing.

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?

A single sentence that is front-loaded with the action and resource, and includes the key condition. Zero wasted words. It earns its place.

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 simple destructive action with full schema coverage and annotations indicating destructiveness, the description is mostly adequate. However, it doesn't mention edge-case behavior (e.g., what happens if index is out of range or if only one tab is open), and there's no output schema to clarify return values. The description is sufficient for basic use but leaves some behavioral gaps.

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%, so the schema already documents both parameters thoroughly. The description adds no additional parameter-level meaning beyond what the schema provides. Baseline 3 is appropriate since the schema carries the full burden.

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 states a specific verb ('Close') and resource ('one tab index') with a clear condition ('if more than one tab is open'). It distinguishes itself from sibling tools like browser.activate_tab and browser.list_tabs, though it doesn't explicitly name them. The purpose is clear and actionable.

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 when to use it (when a tab needs closing and more than one is open) but doesn't explicitly state when not to use it or mention alternatives like browser.close_session. The condition 'if more than one tab is open' provides some usage context, but there's no explicit routing guidance.

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