Skip to main content
Glama

Close all agent tabs

browser_close_all_tabs
DestructiveIdempotent

Close all tabs opened by the agent and remove its tab group, releasing user-owned tabs unchanged. Call when finished to avoid leaving empty groups; also runs automatically at session end.

Instructions

Close every tab the agent opened and remove its tab group. Tabs taken over with browser_use_tab are released back to the user, not closed. Call this when finished with the browser so no empty group is left in the user's tab strip. The MCP process also runs this automatically when the Computer Use session ends. Unsaved state in the agent's tabs is lost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNoStable task or thread ID. Pass the same value on every browser call for this task. Different IDs isolate tabs and cleanup within one MCP process. Omit for the default process session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.3
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Stable task or thread ID. Pass the same value on every browser call for this task. Different IDs isolate tabs and cleanup within one MCP process. Omit for the default process session.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. First observedv0.3.0

TDQS

A4.5/5.0
Behavior5/5

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

The description adds substantial behavioral detail beyond the annotations: it clarifies that user-taken-over tabs are released rather than closed, warns that unsaved state is lost, and discloses automatic execution when the Computer Use session ends. These are meaningful side effects not captured by the structured metadata.

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?

Each sentence serves a distinct purpose: core action, exception handling, when to call, automatic behavior, and data-loss warning. The description is front-loaded with the main operation and remains appropriately sized for a destructive cleanup tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the action, side effects, user-impact, automatic invocation, and unsaved-state warning. For a destructive tool with a single documented parameter and no output schema, this provides everything an agent needs to call it correctly and understand consequences.

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 session_id parameter is fully documented in the schema. The description does not add parameter-level detail, but the baseline of 3 applies because the schema handles the parameter semantics.

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 clearly states the action ('Close every tab the agent opened and remove its tab group') and distinguishes it from sibling tools like browser_close_tab by specifying scope (all agent tabs) and the special handling of tabs taken over via browser_use_tab. This makes the tool's purpose unambiguous.

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?

The description gives explicit usage context: 'Call this when finished with the browser' and notes the automatic execution at session end. It does not explicitly name an alternative for closing a single tab, but the overall context and sibling list make the intended condition clear.

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