Skip to main content
Glama

pilot_tab_close

Close browser tabs by ID to manage browser sessions and reduce clutter. Specify a tab ID to close it, or close the current tab if no ID is provided.

Instructions

Close a browser tab by ID (or current tab if none specified).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoTab ID to close

Implementation Reference

  • Implementation of the pilot_tab_close tool handler.
    server.tool(
      'pilot_tab_close',
      'Close a browser tab by ID (or current tab if none specified).',
      { id: z.number().optional().describe('Tab ID to close') },
      async ({ id }) => {
        await bm.ensureBrowser();
        try {
          await bm.closeTab(id);
          return { content: [{ type: 'text' as const, text: `Closed tab${id ? ` ${id}` : ''}` }] };
        } catch (err) {
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );

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