Skip to main content
Glama

close_tab

Closes a browser tab, defaulting to the active one, and activates the most recently active open tab or the newest if none remains.

Instructions

Closes a tab (default: the active one); the most recently active open tab (else the newest) becomes active and is brought to the front. Returns {closed_tab_id, active_tab_id}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "close_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idNoDefault: the active tab (ids look like 'tab-1').
instance_idNoDefault: 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-rc.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does well on the post-condition — the most recently active open tab, else the newest, becomes active and is brought to the front — but says nothing about what happens when the last tab is closed, whether the close is reversible, or how failures are reported for a destructive operation.

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?

Two compact clauses: the action with its default first, then the resulting state and return shape. Every phrase carries information and the most decision-relevant detail is front-loaded.

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 two-parameter, zero-required tool, the definition covers the default target, the post-close activation rule, and the exact return keys despite there being no output schema. The remaining gap is edge-case behavior, notably closing the final tab and error outcomes.

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 both parameters and their defaults are already documented in the input schema. The description restates the active-tab default for tab_id and adds no format or behavior detail beyond it, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Closes a tab') and immediately qualifies the default target, which separates it from sibling mutations like close_instance by resource. It stops short of explicitly naming an alternative, but the resource itself does the disambiguating work.

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

Usage Guidelines3/5

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

The parenthetical '(default: the active one)' tells the agent what happens when no id is supplied, which is useful usage context. There is no guidance on when to prefer this over close_instance or on preconditions such as whether the tab must be open, so usage is only implied.

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