Skip to main content
Glama

Switch tab

browser_tab_switch

Activate a browser tab by page ID and return its page snapshot, so AI agents can continue working in the correct tab.

Instructions

Make a tab active and return its snapshot.

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": {
      "pageId": "<pageId>"
    },
    "name": "browser_tab_switch"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdYes
sessionNo
snapshotNoPage state returned after the action: diff (default), full, none

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare destructiveHint=false but readOnlyHint=false, i.e. a non-read operation with open-world side effects; the description does not explain what changes (focus/foreground tab), what happens to the previously active tab, or how failures on an unknown pageId are reported. Only the snapshot return is disclosed, which is already implied by the snapshot parameter.

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?

A single eight-word sentence with the action and the return front-loaded, no filler. Its brevity is nearly a defect in coverage, but as structure and economy it is clean.

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

Completeness2/5

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

With three parameters, only one required, and no output schema, the description must carry the snapshot's shape and the meaning of pageId/session, and it does neither. An agent can guess the gist but cannot call it confidently without inspecting the schema.

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

Parameters2/5

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

Schema description coverage is 33%: only the snapshot enum is documented in the schema, while the required pageId and the optional session have no description anywhere. The description does not compensate — it never mentions pageId, the one parameter an agent must supply.

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?

"Make a tab active and return its snapshot" gives a specific verb (make active), a specific resource (tab), and an explicit return value. It is reasonably distinguishable from browser_frame_switch and browser_tab_create by the word "tab" and by the activation framing, though it never names those siblings.

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

Usage Guidelines2/5

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

There is no guidance on when to use this instead of browser_tab_create, browser_frame_switch, or simply navigating. No prerequisites are stated, such as whether the tab must already exist or how a pageId is obtained.

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