Skip to main content
Glama

browser_switch_tab

Attach the operator to a different browser tab using its target ID so later snapshot, click, and type actions run there without needing tab focus.

Instructions

Attach the operator to a different page tab by target id (from browser_tabs). All subsequent snapshot/click/type actions run in the newly attached tab; the previous tab's overlay is left intact. Background operation: the newly attached tab does NOT need focus — the user can keep working in another tab while you operate. Returns the new tab's state-after.

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

Input Schema

NameRequiredDescriptionDefault
targetIdYesTarget id from browser_tabs

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / targetId / description
      Added value: +"Target id from browser_tabs"
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the side effect on routing of later actions, that the previous tab's overlay is preserved rather than torn down, that no focus is required so the user can keep working, and that it returns the new tab's state-after. It stops short of error behavior (invalid or stale target id) or whether the switch can fail if the tab is gone.

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?

Four tight sentences, front-loaded with the action and immediately followed by its consequences. Every sentence carries information, though the closing 'Returns the new tab's state-after' is terse jargon that could be phrased more plainly.

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 one-parameter, non-annotated state-switching tool with no output schema, the description covers the precondition, the lasting effect, the focus independence, and the return value. Only failure modes on a bad targetId are missing, which is a minor gap given the tool's simplicity.

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 coverage is 100% and the single targetId parameter is already described as 'Target id from browser_tabs', which the description merely restates. Baseline 3 applies since the schema does the documentation work and the description adds no extra format or validation detail.

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 ('Attach the operator to a different page tab') plus the keying argument ('by target id'). It also distinguishes itself from the sibling that produces the id by pointing to browser_tabs, so an agent can tell the two apart without opening a schema.

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?

Make clear the precondition (obtain targetId from browser_tabs) and the consequence (all subsequent snapshot/click/type actions run in the new tab). It does not name explicit when-not conditions or a competing alternative, which keeps it below a 5.

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