Skip to main content
Glama

switch_tab

Bring a specified browser tab to the front so it becomes active. Call this first to target that tab, since navigation, interaction, and read actions only affect the active tab.

Instructions

Bring a tab to the front so it becomes the active tab. All navigation/interaction/read tools operate on the active tab, so call this first to target a specific tab.

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": "switch_tab"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetIdYesTab targetId as returned by list_tabs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the key behavioral trait: this mutates global browser state (the active tab) that every other tool depends on. However, it says nothing about failure modes (invalid or closed targetId), whether the call is idempotent, or what it returns, leaving notable gaps 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste, with the effect front-loaded and the cross-tool consequence second. Every sentence earns its place.

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 state-changing tool with no output schema, the essential invariant (other tools act on the active tab) is covered. Only edge-case behavior on a missing or stale targetId is absent, 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 parameter is already documented ('Tab targetId as returned by list_tabs'). The description adds no further meaning about the parameter, so baseline 3 applies.

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 and resource ('Bring a tab to the front so it becomes the active tab'), which is unambiguous. It also implicitly separates this tool from siblings like list_tabs (source of targetId) and new_tab by framing it as the way to target an existing tab.

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?

It gives a clear directive ('call this first to target a specific tab') and explains why: all navigation/interaction/read tools operate on the active tab. That is strong when-to-use guidance. It stops short of naming alternatives or exclusions (e.g., whether new_tab already activates the new tab), so it is not a full 5.

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