Skip to main content
Glama

browser_close_tab

Close a tab of the phone browser by its index from browser_tabs. Returns the remaining tabs.

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": {
      "session": "<session>",
      "index": "<index>"
    },
    "name": "browser_close_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYes
sessionYesSession from open_app

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, consistent with closing a tab being a state mutation that is not data-destructive. The description adds the return behavior ('Returns the remaining tabs'), which matters because there is no output schema, but it omits whether the closed tab is recoverable and whether the session must be active.

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 sentences, both front-loaded with the action first and the return value second. No filler, no restatement of the tool name.

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 tool with no output schema, the description covers the action, the index source, and the return value. Remaining gaps (session prerequisites, error behavior on invalid index) are minor for this complexity level.

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

Parameters4/5

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

Schema coverage is 50%: 'session' is documented ('Session from open_app') while 'index' has no schema description at all. The description compensates by explaining that index is a tab index sourced from browser_tabs, which is exactly the missing semantic an agent needs. It does not state whether indices are zero-based or shift after closing, but it covers the main 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?

States a specific verb and resource ('Close a tab of the phone browser') plus the addressing scheme ('by its index from browser_tabs'), which separates it from browser_tabs (list), browser_open (create), and browser_click. It stops short of naming alternatives directly, but the resource is unambiguous.

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 phrase 'index from browser_tabs' implicitly routes the agent to call browser_tabs first to obtain a valid index, which is real usage guidance. There is no explicit when-not guidance, no statement of prerequisites for the required session parameter, and no mention of what happens if the index is stale or out of range.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.