Skip to main content
Glama
chrome-fast
by ventos312

tab_close

Destructive

Close a browser tab by target ID or close the current tab when no ID is provided, then switch to another open tab automatically.

Instructions

Close a tab by its target ID, or the current tab if omitted. When the current tab is closed, attaches to another open tab.

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": "tab_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetIdNoTarget ID of the tab to close (default: current tab)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, so the safety profile is covered. The description adds genuinely new behavior — that closing the current tab attaches to another open tab — but says nothing about side effects such as losing unsaved page state, or what happens when no other tab exists to attach to.

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 short sentences, zero filler, with the target-selection rule stated first and the post-close behavior second.

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 one-parameter tool with no output schema and an annotation covering destructiveness, this is nearly complete: it covers target selection and the attach-after-close outcome. Only failure modes (last tab, missing ID) are unaddressed.

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% and the single parameter already documents the current-tab default, so the description repeats rather than extends the schema. Baseline 3 applies; no format or ID-source hints are added.

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 ("Close a tab") plus the default target when no ID is given, which is the key distinction from tab_switch/tab_new. It does not explicitly name a sibling, but the tab-prefixed naming in the sibling set makes the boundary obvious.

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?

Implies usage by describing the default (close current tab if targetId omitted), but gives no explicit when-to-use/when-not guidance, e.g. whether to use tab_switch instead to navigate away, or what to do if the last tab would be closed.

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