Skip to main content
Glama

switch_tab

Switches the active default tab to a given ID, setting it as the target for later calls and optionally the browser window.

Instructions

Switches the active default tab to the specified Tab ID. Side effects: the switched tab becomes the default target of all subsequent tool calls in this instance that omit 'tab_id'; when 'activate' is true it is also brought to the foreground in the Chrome window ('activate' defaults to true). Prerequisites: the tab must exist (see 'list_tabs'). Returns: structured JSON with the new 'active_tab_id' and whether the tab was brought to the foreground. Use this before interacting with a different page without repeating 'tab_id' on every call. Alternatives: pass 'tab_id' directly on an individual tool call to address a tab without switching.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idYesThe Tab ID to switch to (e.g. 'tab-1').
activateNoIf true, brings the tab to the foreground in the browser. Defaults to true.
instance_idNoChrome instance id from open_instance/list_instances. Omit for the default instance.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv1.3.2
    • removedInput schema / properties / activate / nullable
      Removed value: -true
    • removedInput schema / properties / instance_id / nullable
      Removed value: -true
  2. Addedv1.0.11

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries full disclosure burden. It clearly states side effects (becomes default target, brings to foreground when activate is true), prerequisites (tab must exist, with pointer to list_tabs), and return format (structured JSON with active_tab_id and foreground status). This is thorough and accurate.

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?

Each sentence delivers distinct information: action, side effects, defaults, prerequisites, return value, usage guidance, and alternatives. It is front-loaded with the core action and avoids filler. Though slightly long, every clause earns its place.

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?

Given the tool's complexity (side effects, defaults, prerequisites, return), the description covers everything an agent needs: what it does, why to use it, what changes state, and what to expect in response. No output schema exists, so the return description is essential and provided.

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 description coverage is 100%, so the baseline is 3. The description adds meaningful context beyond the schema: it explains that tab_id becomes the default for subsequent calls, and that activate defaults to true and controls foregrounding. This enhances understanding of each parameter without redundancy.

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 ('Switches') and a clear resource ('active default tab to the specified Tab ID'). It also differentiates from sibling tools by explaining that unlike passing tab_id directly, this changes the default target, and names alternatives like list_tabs. No ambiguity.

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?

Explicitly says when to use it: 'before interacting with a different page without repeating tab_id on every call.' Also gives the alternative: 'pass tab_id directly on an individual tool call to address a tab without switching.' Provides both use case and exclusion, which is complete guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raultov/chrome-debug-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server