Skip to main content
Glama

manage_tabs

List, open, switch, and close browser tabs. Retrieve tab indexes, URLs, and titles to manage sessions, or open new tabs with optional URLs.

Instructions

Manage browser tabs, including opening new ones.

Use this for listing, opening, switching, or closing tabs. Use open_url and manage_history for navigation within the active tab.

Args: action: - "list_tabs": Return each tab's index, URL, and title. Use this to find the tab_index for "switch_to_tab". - "open_new_tab": Open a new tab, optionally navigating to url. - "switch_to_tab": Switch to the tab at tab_index from "list_tabs". - "switch_to_newest_tab": Switch to the newest tab. - "close_active_tab": Close the active tab. This action must be followed by a 'manage_tabs' action that switches to a new tab, such as "switch_to_tab" or "switch_to_newest_tab".

url: URL for "open_new_tab". If not provided, "about:blank" is used.

tab_index: Tab index from "list_tabs" that is only used for the
    "switch_to_tab" action.)

switch_to: If using "open_new_tab", switch to the new tab when True.

Notes: Tab indexes are session-relative and may change after tabs are opened or closed. Use "list_tabs" to get current indexes before switching by index.

Error behavior: If there's an error during any of the tab actions, then @handle_sb_errors will propagate the exception as an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
actionNolist_tabs
switch_toNo
tab_indexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.0

TDQS

A5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the destructive close_active_tab action and the requirement to follow it with a switch action, notes that tab indexes are session-relative and unstable, and documents the error-handling behavior through @handle_sb_errors. This goes well beyond the bare action list.

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?

The description is clearly organized with Args, Notes, and Error behavior sections. Every block adds practical information: action semantics, parameter constraints, session-relative index warnings, and exception propagation. The length is justified by the multi-action surface.

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?

For a multi-action browser-tab tool with no annotations and an output schema present, the description alone covers all the essential semantics: what to use it for, what each action does, how parameters interact with actions, session-relative index caveats, and error behavior. An agent has enough to call it correctly.

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

Parameters5/5

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

The input schema has no per-parameter descriptions, but the tool description explains every parameter, including defaults, action-specific applicability, and the meaning of switch_to. For example, it says tab_index is only used by switch_to_tab and that url defaults to about:blank on open_new_tab. This fully compensates for the schema's 0% coverage.

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 first sentence identifies a specific capability (managing browser tabs: list, open, switch, close) and explicitly contrasts with open_url and manage_history for navigation within the active tab. This lets an agent distinguish manage_tabs from siblings without inspecting schemas.

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?

It explicitly says when to use this tool ('listing, opening, switching, or closing tabs') and when to use alternatives ('open_url' and 'manage_history' for navigation within the active tab). It also gives procedural guidance, such as using list_tabs to obtain a current tab_index before switch_to_tab because indexes change.

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