Skip to main content
Glama
xav-ie

Browser Session MCP

close_tab

Destructive

Closes a tab at a given index, leaving the session and other tabs open; call list_pages again before using another index.

Instructions

Close the tab at tabIndex (from list_pages). The session and its other tabs stay open; if the closed tab was active, the last remaining tab becomes active. Tabs after it shift down one index, so call list_pages again before using another index. Closing the last tab leaves the session open with no tabs; the next navigate opens a new one. To end the whole session, use close_browser_session. Returns a confirmation. Fails if the session has no tab at that index.

Input Schema

NameRequiredDescriptionDefault
tabIndexYesA tab's 0-based index from list_pages. Errors if the session has no tab at that index.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / sessionId / description
      Added value: +"The id returned by open_browser_session. Errors if no open session has it."
    • addedInput schema / properties / tabIndex / description
      Added value: +"A tab's 0-based index from list_pages. Errors if the session has no tab at that index."
  2. First observedv0.1.2

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description discloses the key behavioral consequences: the session survives, index shifting invalidates other indices, the last-tab edge case, and the failure mode for a bad index. This is exactly the context annotations cannot convey for a destructive mutation.

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?

Front-loaded with the action and its return, and nearly every sentence carries a distinct fact. It is somewhat dense and repeats the 'session stays open' idea in two separate sentences, but no sentence is pure filler.

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

Completeness5/5

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

For a two-parameter destructive tool with no output schema, the description covers return value ('Returns a confirmation'), error behavior, side effects, and the sibling alternative. Nothing an agent needs to call it correctly is missing.

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 100%, so the baseline is 3, but the description adds genuinely new semantics: that indices shift after a close and must be re-derived via list_pages. That is meaning the schema does not express, lifting it above baseline.

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

Purpose5/5

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

The description opens with a specific verb+resource ('Close the tab at `tabIndex`') and immediately contrasts the scope with `close_browser_session`, so an agent can distinguish the two without reading either schema.

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

Usage Guidelines5/5

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

It gives both a when-to-use-alternative ('To end the whole session, use close_browser_session') and an explicit precondition for reuse ('call list_pages again before using another index'), leaving nothing to inference.

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