Skip to main content
Glama

close_tab

Close a specific tab by its Tab ID, removing it from the registry and switching to another active tab. Use it to clean up unused tabs and manage browser sessions.

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.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv1.3.2
    • removedInput schema / properties / instance_id / nullable
      Removed value: -true
  2. Addedv1.0.11

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden. It discloses side effects (destructive, removes tab from registry, closes in Chrome, active tab handling) and return value structure. This is comprehensive and goes beyond minimal requirements.

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?

The description is structured logically: purpose, side effects, prerequisites, return, usage, alternative. It is appropriately sized with no redundant sentences, and the core purpose is front-loaded.

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?

For a tool with two parameters (one required) and no output schema, the description explains the return value, side effects, and usage guidance sufficiently. It also integrates with sibling tool context, making it complete for an agent to invoke correctly.

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 schema itself fully documents both parameters. The description adds some context (e.g., prerequisite of tab existing) but does not provide additional parameter-level semantics beyond what the schema already states, aligning with the baseline of 3.

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 and resource ('Closes a specific tab by its registered Tab ID') and differentiates from sibling tools like 'close_instance' by explicitly naming it as an alternative. This makes the tool's purpose unmistakable.

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?

It clearly indicates when to use the tool ('Use this to clean up tabs you no longer need'), states prerequisites ('the tab must exist (see 'list_tabs')'), and names the alternative ('close_instance' to stop a whole Chrome instance). This explicitly guides selection among siblings.

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

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