Skip to main content
Glama

browser.close_tab

Destructive

Close a specific browser tab by its zero-based index when multiple tabs are open, reducing clutter and managing active browser sessions.

Instructions

Close one tab index if more than one tab is open.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "index": "<index>"
    },
    "name": "browser.close_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYesZero-based index of the target tab, as reported by browser.list_tabs.
session_idNoTarget session id, from browser.create_session or browser.list_sessions. Optional when exactly one session is live; observe and act tools create one when none is.
approval_idNoID of the granted approval for exactly this call, from its approval_required answer.
workflow_profileNogoverned: a call that can change something waits for approval. It answers status approval_required with an approval_id; call again with that id once it is granted. fast, the default, runs it directly unless this tool or deployment always requires approval.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.19.0
    • addedInput schema / properties / approval_id
      Added value: +{
      +  "description": "ID of the granted approval for exactly this call, from its approval_required answer.",
      +  "type": "string"
      +}
    • addedInput schema / properties / workflow_profile
      Added value: +{
      +  "description": "governed: a call that can change something waits for approval. It answers status approval_required with an approval_id; call again with that id once it is granted. fast, the default, runs it directly unless this tool or deployment always requires approval.",
      +  "enum": [
      +    "fast",
      +    "governed"
      +  ],
      +  "type": "string"
      +}
  2. Addedv1.8.1
  3. Removedv1.4.2
  4. Changed2 schema fields changedv1.4.2
    • addedInput schema / properties / index / description
      Added value: +"Zero-based index of the target tab, as reported by browser.list_tabs."
    • addedInput schema / properties / session_id / description
      Added value: +"ID of the target browser session, as returned by browser.create_session or listed by browser.list_sessions."
  5. Changed3 schema fields changedv1.0.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / session_id / maxLength
      Added value: +120
    • addedInput schema / properties / session_id / minLength
      Added value: +1
  6. First observedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is known. The description adds one piece of beyond-schema behavior: the multi-tab precondition. It does not explain what happens when the precondition fails (error vs. silent no-op) or what occurs to the session when the final tab is closed.

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?

A single short sentence with the action front-loaded and no filler. It is efficient, though the brevity leans toward under-specification rather than maximal clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, session-scoped mutation the schema is rich (session, approval, workflow profile) and annotations cover risk, so the description needn't repeat those. The remaining gap — post-close state, error behavior on the last tab, and no-tab-found case — is meaningful but not fatal.

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%, including index semantics, session_id sourcing, approval_id, and the governed/fast workflow_profile enum, so the schema carries the parameter burden. The description contributes nothing about any parameter beyond what is already documented. Baseline 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 concrete verb (close) and resource (tab index), so an agent immediately knows the operation. It does not differentiate itself from siblings such as browser.close_session or browser.activate_tab, which limits it below a 5.

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?

Provides one real usage condition — only call when more than one tab is open — which is useful gating. However, it never names alternatives such as closing the whole session, and doesn't say whether closing the last tab is forbidden or merely redundant.

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