Skip to main content
Glama

close_tabs

Destructive

Close one or more browser tabs by ID or session ID, ensuring only agent-owned tabs are removed unless operator override is set.

Instructions

Close one or more tabs by native tab id or composite session_id. Accepts a single identifier or a list; identifiers in one call must belong to the same browser. By default it closes only tabs created by this MCP task and requires the owner_id returned by open_new_tab; lifecycle generations are checked before removal. Set only_if_agent_owned=false only for an explicit operator request to close a user tab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idYes
owner_idNo
session_idNo
only_if_agent_ownedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate destructive and non-idempotent behavior. The description adds crucial behavioral details: ownership checking (only closes agent-owned tabs by default), lifecycle generation checks before removal, and the need for owner_id. It also warns that bypassing the ownership flag requires explicit operator request, adding a safety dimension beyond the raw annotations. No contradiction with annotations.

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 description is concise but dense, starting with the core purpose in the first sentence. It packs necessary constraints and flags without excessive verbosity. While it is longer than a one-liner, every sentence contributes critical information, making it efficient and well-structured.

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?

Given the tool's complexity (destructive, ownership logic, multiple identifier types, a flag), the description covers the main usage requirements and constraints. It explains the default behavior, the flag's usage, and the same-browser limitation. It doesn't describe return values, but the presence of an output schema shifts that responsibility. It doesn't detail failure modes, but that is not essential for correct invocation.

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

Parameters5/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 fully compensate. It explains tab_id as native tab id or composite session_id, and notes it can be a single identifier or list. It explains owner_id is required by default and comes from open_new_tab. It explains only_if_agent_owned flag's purpose and default. It also clarifies that identifiers must belong to the same browser. Every parameter is given meaning beyond its schema type.

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 explicitly states the verb and resource: 'Close one or more tabs'. It specifies the identifier types (native tab id or composite session_id) and that it can accept a single or list. This clearly distinguishes it from sibling tools like switch_tab or activate_tab, which perform different actions on tabs. The purpose is 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 provides usage context: it defaults to closing only agent-created tabs, requires owner_id from open_new_tab, and explicitly instructs when to set only_if_agent_owned=false (only for explicit operator request). It also notes that identifiers must belong to the same browser. It doesn't mention alternatives because no other close tool exists among siblings, but it clearly defines the intended use case and constraints.

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