Skip to main content
Glama

browser_close_tab

Close a browser tab by its ID, with an option to force-close pages that show unsaved-change prompts so automation does not time out.

Instructions

Close a browser tab by its ID.

Args: tab_id: The tab ID to close (get IDs from browser_tabs) force: Disarm "Leave page?" (beforeunload) prompts first - upload/editor pages otherwise hold the tab open and the close times out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
tab_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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. It discloses a genuinely useful quirk — that upload/editor pages hold a tab open via beforeunload and cause the close to time out unless force is set — but says nothing about behavior on a missing tab ID, errors, or loss of tab/session state.

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?

The core action is front-loaded in a single sentence, followed by a compact per-argument breakdown. The Args block is slightly verbose but every line carries information about behavior or value source.

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 simple two-parameter close tool with no output schema and no annotations, the description covers purpose, both parameters, and the key timeout quirk. Only explicit error/return behavior is absent, a minor gap for such a simple operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: tab_id is annotated with its source (browser_tabs), and force is explained with its mechanism and the failure mode it prevents. This adds real meaning beyond the bare integer/boolean schema types.

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 states a specific verb (close), resource (browser tab), and selector (by its ID). It is clearly distinguishable from the sibling browser_close_window since it explicitly scopes to a tab, not a window.

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?

It gives useful route guidance by pointing to browser_tabs as the source of tab IDs, and explains the force condition. However, it never states when to prefer this over close_window or other tab-management siblings, leaving the when-to-use decision largely implied.

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

Deploy Server

Other Tools