Skip to main content
Glama

browser_tab_select

Read-only

Select a specific browser tab by its index number to manage multiple open tabs during web automation tasks.

Instructions

Select a tab by index

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesThe index of the tab to select

Implementation Reference

  • The handler function for the 'browser_tab_select' tool. It selects the tab at the given index using the context and includes a snapshot in the response.
    handle: async (context, params, response) => {
      await context.selectTab(params.index);
      response.setIncludeSnapshot();
    },
  • Schema definition for the 'browser_tab_select' tool, including name, title, description, input schema requiring an 'index' number, and type 'readOnly'.
    schema: {
      name: 'browser_tab_select',
      title: 'Select a tab',
      description: 'Select a tab by index',
      inputSchema: z.object({
        index: z.number().describe('The index of the tab to select'),
      }),
      type: 'readOnly',
    },
  • Registration of the 'browser_tab_select' tool (as 'selectTab') by exporting it in the default array of tools from tabs.ts.
    export default [
      listTabs,
      newTab,
      selectTab,
      closeTab,
Behavior3/5

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

Annotations indicate readOnlyHint=true and destructiveHint=false, so the agent knows this is a safe, non-destructive operation. The description adds minimal behavioral context beyond this—it doesn't explain what 'select' does (e.g., brings tab to focus, changes active view) or any constraints like index validity. No contradiction with annotations, but the description adds little value given the annotations.

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 a single, efficient sentence: 'Select a tab by index.' It's front-loaded with the core action and resource, with no wasted words. This is appropriately concise for a simple tool, making it easy for an AI agent to parse quickly.

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

Completeness3/5

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

Given the tool's low complexity (one parameter, simple operation), annotations cover safety (read-only, non-destructive), and no output schema, the description is minimally adequate. However, it lacks details on behavioral outcomes (e.g., what happens after selection) and usage context, which could help an agent use it correctly in workflows with sibling tools.

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 description coverage is 100%, with the parameter 'index' fully documented in the schema. The description mentions 'by index' but adds no extra meaning beyond what the schema provides (e.g., index range, zero-based vs. one-based, or relation to tab list). Baseline score of 3 is appropriate as the schema handles parameter documentation adequately.

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?

The description 'Select a tab by index' clearly states the action (select) and resource (tab), with the method (by index) specified. It distinguishes from siblings like 'browser_tab_list' (list tabs) and 'browser_tab_close' (close tab), though it doesn't explicitly contrast them. The purpose is specific but could be slightly more detailed about what 'select' entails in this context.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an open browser or tab list), exclusions, or comparisons to siblings like 'browser_tab_new' (create new tab) or 'browser_navigate' (change URL). Usage is implied by the name but not explicitly stated, leaving gaps for an AI agent.

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

Install Server

Other Tools

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/maywzh/playwright-mcp'

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