Skip to main content
Glama

browser_switch_tab

Switch the active browser tab by ID so subsequent actions target that tab. Use IDs from browser_list_tabs or browser_get_new_tab; optionally bring Chrome to front only after user consent.

Instructions

Switch to a specific browser tab by ID. Get tab IDs from browser_list_tabs or browser_get_new_tab. The other tools then act on that tab. Chrome is not brought in front of the user: the tab is made active in its window, and visibility says whether the page is hidden behind other windows.

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": {
      "tab_id": "<tab_id>"
    },
    "name": "browser_switch_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idYesTab ID to switch to
partitionNoRun this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.
bring_to_frontNoAlso bring the Chrome window in front of the user. Takes the user's screen: only after the user agreed (browser_ask_user). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.33.0
    • addedInput schema / properties / partition
      Added value: +{
      +  "description": "Run this call in a partition from browser_partition (an id like \"p1\"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv1.30.2
    • addedInput schema / properties / bring_to_front
      Added value: +{
      +  "description": "Also bring the Chrome window in front of the user. Takes the user's screen: only after the user agreed (browser_ask_user). Default false.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / tab_id / description
      Previous value: -"Tab ID to activate"New value: +"Tab ID to switch to"
  3. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the disclosure burden and does it well: it explains that the window is not raised, only the tab becomes active within its window, and that a visibility signal reports whether the page is occluded. It stops short of describing failure behavior for an invalid or closed tab ID, which would matter for an unannotated tool.

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?

Three short sentences, front-loaded with the action and the ID source before any caveats. The final clause about 'visibility' is slightly cryptic since no output schema documents that field, but nothing is redundant.

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 3-parameter, unannotated, no-output-schema tool, the description covers the action, ID provenance, window-vs-tab semantics, and the visibility signal. The main gap is error/edge-case behavior beyond the partition note already in the schema.

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 3 is the baseline, but the description genuinely adds meaning for bring_to_front by contrasting 'tab made active in its window' with raising the Chrome window, which the schema's one-line note does not make as crisp. The tab_id source guidance also adds provenance the schema lacks.

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?

States a specific verb and resource ('Switch to a specific browser tab') plus the keying mechanism ('by ID'), which immediately separates it from browser_list_tabs or browser_close_tab. The added line 'The other tools then act on that tab' clarifies the tool's role in the sequence rather than just restating the name.

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

Usage Guidelines4/5

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

Explicitly tells the agent where tab IDs come from ('browser_list_tabs or browser_get_new_tab') and what to do afterwards. It also implies the default behavior is non-disruptive ('Chrome is not brought in front of the user'), though it does not spell out a when-not-to-use case beyond deferring to the user via bring_to_front.

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