Skip to main content
Glama

switch_tab

Open, switch, or close browser tabs by ID. After switching, previous references become invalid—call view_page before acting on the new tab.

Instructions

Open a new tab, switch to a tab by ID (from virtual_desk), or close one. Prefer 'open' over navigate when the user's active tab must stay untouched. Refs from the previous tab are invalid afterwards — call view_page before acting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabNoTab ID or 1-based number (switch/close; close: active tab)
urlNoURL for a new tab (open); default about:blank
actionNoopen | switch | closeswitch

Schema Changelog

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

  1. Changed5 schema fields changedv2.10.5
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / action / description
      Previous value: -"Action: open (new tab), switch (to existing tab, default), close (close tab)"New value: +"open | switch | close"
    • changedInput schema / properties / tab / description
      Previous value: -"Tab ID or tab number (1-based index, e.g. '2') to switch to or close (defaults to active tab for close)"New value: +"Tab ID or 1-based number (switch/close; close: active tab)"
    • changedInput schema / properties / url / description
      Previous value: -"URL to navigate to (for open action, defaults to about:blank)"New value: +"URL for a new tab (open); default about:blank"
  2. First observedv2.7.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It clearly warns that refs from the previous tab are invalid afterward and tells the agent to call view_page before acting, which is a key side-effect beyond what the schema reveals.

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?

Three short sentences deliver all essential guidance with no filler. The main action set is front-loaded, followed by the usage caveat and the critical invalidation warning, each earning 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?

The description covers the three actions, the source of tab IDs, the open-vs-navigate decision, and the invalid-ref consequence, which is strong for a tool without annotations or an output schema. It could be slightly more explicit about post-open/switch state, but the provided guidance is sufficient for correct invocation in most cases.

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 the baseline is 3. The description adds meaningful value by specifying that tab IDs come from virtual_desk and by clarifying the open behavior relative to the active tab, going slightly beyond the schema's parameter descriptions.

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 clearly enumerates three specific operations—open, switch, and close—on tabs, and ties tab IDs to virtual_desk. It is differentiated from navigate by explicitly preferring open when the active tab must stay untouched.

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 explicit guidance to prefer open over navigate when the active tab must remain unchanged, which is a concrete decision rule. It also instructs that view_page should be called after switching because old refs are invalid, though it does not fully cover when to use alternatives like tab_status.

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/Silbercue/public-browser'

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