Skip to main content
Glama

close_tab

Close a specific tab by its ID to clean up browser resources. Provides the new active tab ID or null when no tabs remain.

Instructions

Closes a specific tab by its registered Tab ID. Side effects: destructive - removes the tab from the registry and closes it in Chrome; if it was the active tab, another registered tab becomes active. Prerequisites: the tab must exist (see 'list_tabs'). Returns: structured JSON with the closed 'tab_id' and the new 'active_tab_id' (null when no tabs remain). Use this to clean up tabs you no longer need. Alternatives: 'close_instance' to stop a whole Chrome instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idYesThe Tab ID of the tab to close (e.g. 'tab-1').
instance_idNoChrome instance id from open_instance/list_instances. Omit for the default instance.
Behavior5/5

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

With no annotations provided, the description takes on full disclosure duty. It clearly declares the destructive side effects, removal from the registry, fallback active tab behavior, and the exact return value shape when no tabs remain.

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?

Every sentence delivers distinct value: operation, side effects, prerequisites, return shape, and alternative. No filler or redundant restatement of the tool name exists.

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?

All essential categories are covered thoroughly despite the lack of an output schema: prerequisites, side effects, return contract, intended usage, and meaningful alternatives. An agent has enough information to invoke this tool safely and correctly.

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 coverage is 100%, so parameter meaning is mostly captured. The description nevertheless contributes the 'registered' requirement and the prerequisite that the tab must exist, which guides correct parameter selection beyond the schema fields.

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 uses a specific verb ('Closes') and clearly identifies the target resource ('a specific tab by its registered Tab ID'). It also distinguishes the tool from sibling 'close_instance' and ties it to the tab lifecycle in a way that is immediately unambiguous.

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

Usage Guidelines5/5

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

The description explicitly states when to use it ('clean up tabs you no longer need'), the prerequisite ('the tab must exist'), and the key alternative ('close_instance' to stop the whole instance). This gives an agent actionable routing and avoids misuse.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raultov/chrome-debug-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server