Skip to main content
Glama

pilot_tab_new

Open a new browser tab, optionally navigating to a URL. Returns the tab ID and URL.

Instructions

Open a new browser tab, optionally navigating to a URL. Use when the user wants to open a link in a new tab, create a blank tab, or work with multiple pages simultaneously.

Parameters:

  • url: Optional URL to navigate to in the new tab (omit for a blank about:blank tab)

Returns: The new tab's ID and URL (if provided).

Errors:

  • "Invalid URL": The URL is malformed. Provide a complete URL with protocol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL to navigate to in the new tab

Implementation Reference

  • Handler for pilot_tab_new tool — opens a new browser tab with optional URL. Delegates to browser extension (ext.send) or Playwright (bm.newTab) depending on whether extension is connected.
      server.tool(
        'pilot_tab_new',
        `Open a new browser tab, optionally navigating to a URL.
    Use when the user wants to open a link in a new tab, create a blank tab, or work with multiple pages simultaneously.
    
    Parameters:
    - url: Optional URL to navigate to in the new tab (omit for a blank about:blank tab)
    
    Returns: The new tab's ID and URL (if provided).
    
    Errors:
    - "Invalid URL": The URL is malformed. Provide a complete URL with protocol.`,
          { url: z.string().optional().describe('URL to navigate to in the new tab') },
        async ({ url }) => {
          await bm.ensureBrowser();
          try {
            const ext = bm.getExtension();
            if (ext) {
              const res = await ext.send<{ tabId: number }>('new_tab', { url });
              bm.setExtActiveTab(res.tabId);
              return { content: [{ type: 'text' as const, text: `Opened tab ${res.tabId}${url ? ` → ${url}` : ''}` }] };
            }
            const id = await bm.newTab(url);
            return { content: [{ type: 'text' as const, text: `Opened tab ${id}${url ? ` → ${url}` : ''}` }] };
          } catch (err) {
            return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
          }
        }
      );
  • Input schema for pilot_tab_new — accepts an optional URL string parameter.
    { url: z.string().optional().describe('URL to navigate to in the new tab') },
  • pilot_tab_new is registered in the 'standard' tool profile set, which determines which tools are available based on the configured profile.
    'pilot_tabs', 'pilot_tab_new', 'pilot_tab_close', 'pilot_tab_select',
  • The registerAllTools function invokes registerTabTools (from tabs.ts) which registers pilot_tab_new via server.tool().
    registerTabTools(effectiveServer, bm);
  • BrowserManager.newTab helper used as fallback when no browser extension is connected — creates a new Playwright page, optionally navigates to the given URL.
    // ─── Tab Management ────────────────────────────────────────
    async newTab(url?: string): Promise<number> {
      if (!this.context) throw new Error('Browser not launched');
      if (url) await validateNavigationUrl(url);
    
      const page = await this.context.newPage();
      const id = this.nextTabId++;
      this.pages.set(id, page);
      this.activeTabId = id;
      this.wirePageEvents(page);
    
      if (url) {
        await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 15000 });
      }
      return id;
    }
Behavior4/5

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

Without annotations, the description discloses return values (tab ID and URL) and error conditions (invalid URL). It does not detail if the tab is focused or other behaviors, but covers key aspects.

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?

The description is concise with a clear main action. It then lists parameter, returns, and errors, which is structured but slightly verbose given the simple tool.

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?

For a simple tool with no output schema or annotations, the description covers purpose, parameter, returns, and errors. It is complete enough for an agent to use correctly, though behavioral details like tab focus are missing.

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?

The schema covers the parameter 100%, and the description adds meaningful context: 'url is optional, omit for blank about:blank tab'. This clarifies usage beyond the schema's description.

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 states the tool opens a new browser tab with an optional URL. It distinguishes from siblings like pilot_tab_select and pilot_tab_close by focusing on creation.

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?

The description explicitly lists use cases: opening a link in a new tab, creating a blank tab, or working with multiple pages. It provides clear context but does not mention when not to use or alternative tools.

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/TacosyHorchata/Pilot'

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