Skip to main content
Glama

web_close_tab

Closes a specific browser tab by target ID, allowing AI agents to remove unneeded tabs after navigation or page interaction tasks.

Instructions

Close a tab by id.

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": {
      "target_id": "<target_id>"
    },
    "name": "web_close_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
target_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it says nothing about what happens to the closed tab's state, whether closing the last tab ends the session, whether an unknown id errors or is ignored, or whether the action is reversible. 'Close' implies a destructive mutation, but none of the consequences are disclosed.

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?

One short, front-loaded sentence with no redundant wording. It is efficiently structured, though its brevity is achieved by omitting information rather than by tight editing.

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

Completeness2/5

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

For a one-parameter mutation tool with no annotations and no output schema, the description should at minimum say where the id comes from and what happens on success or invalid input. Neither is covered, leaving the agent to guess at the call's prerequisites and failure semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% for the single required target_id, and the description only adds that it is an 'id', not whether it is a tab handle, index, or URL fragment, nor how to obtain one. That is marginally more than the schema's bare string type but far short of compensating for the coverage gap.

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?

"Close a tab by id" gives a specific verb (close) and resource (tab), and the 'by id' qualifier distinguishes it from operations that act on the active tab implicitly. It is clear what the tool does, though it never names the sibling (web_tabs) that would supply the id, so it is not fully differentiated.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisite such as obtaining a valid tab id from web_tabs, and no note on how this differs from leaving a tab open or switching away. An agent must infer that this is the teardown counterpart to web_new_tab purely from the name.

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