Skip to main content
Glama

Close a browser window

browser_close_window

Closes an entire Firefox window and every tab in it. Pass a tab or window context ID to choose the window, or omit it to close the active tab’s window.

Instructions

Close a whole window — every tab in it (BiDi browsingContext.close on a top-level context). Without a context it acts on the active tab is NOT what happens here: it closes the window that tab belongs to, so check first. browser_close_tab closes a single tab instead.

Input Schema

NameRequiredDescriptionDefault
contextNoA tab or window context id; the top-level window it belongs to is closed (default: active tab window)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

readOnlyHint=false only marks this as a mutation; the description carries the real weight by spelling out the blast radius — every tab in the window dies, not just the current one — and that the default target is the active tab's window. It does not say whether closed windows can be reopened or whether prompting/unload handlers intervene.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core fact is front-loaded, but the middle clause is garbled — 'it acts on the active tab is NOT what happens here' reads as a leftover edit and forces the reader to parse twice. A tighter phrasing would have made the same warning in half the words.

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 one-optional-param destructive tool with no output schema and minimal annotations, the description covers target resolution, default behavior, and the sibling boundary. Only the irreversibility/undo story is missing.

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%, so the single context parameter is already documented, including that any tab id in the window resolves to its top-level window. The description restates the same default but adds no format or id-source details beyond the schema, so this sits at the baseline.

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?

States a specific verb and resource (close a whole window, all tabs) and grounds it in the underlying primitive (BiDi browsingContext.close on a top-level context). It explicitly separates this from browser_close_tab, so an agent can pick between them without opening schemas.

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

Usage Guidelines4/5

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

Names the alternative browser_close_tab and the condition that selects it (single tab), plus a caution to 'check first' before invoking since the target is the whole window the tab belongs to. It stops short of covering other nearby destructive siblings like browser_quit or browser_close_other_tabs, so not a full routing map.

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