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 };
        }
      }
    );
Behavior2/5

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

No annotations provided, so description carries full burden. States the action but omits behavioral details: what happens after closing (focus shift?), closing last tab implications, session persistence, or return value. 'Close' implies state change but lacks safety context.

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?

Single sentence, front-loaded with action verb. Parenthetical efficiently conveys optional parameter semantics. Zero redundancy - every word earns its place.

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?

Appropriate for a simple 1-parameter tool with full schema coverage, but misses opportunity to reference pilot_tabs for ID discovery. No output schema means description should ideally mention if/what is returned (void vs confirmation).

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% but description adds crucial semantic detail: the default behavior when ID is omitted (current tab). This compensates for schema not indicating the behavioral fallback, though it could add that IDs come from pilot_tabs.

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?

Description uses specific verb 'Close' with specific resource 'browser tab' and clearly distinguishes from sibling 'pilot_close' (browser/window) via the 'tab' qualifier. The parenthetical clarifies targeting mechanism (ID vs current tab).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides implied usage guidance through the optional parameter explanation ('or current tab if none specified'), but lacks explicit 'when to use' guidance, prerequisites (e.g., obtaining IDs from pilot_tabs), or differentiation from pilot_close.

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