Skip to main content
Glama

create_tab

Open a new Firefox tab with isolated session and debugging capabilities, enabling controlled browser automation and advanced multi-tab monitoring.

Instructions

Create a new tab with isolated session and debugging

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextIdNo
enableMonitoringNo
tabIdYes
urlNoabout:blank

Implementation Reference

  • Main handler function for 'create_tab' tool. Creates a new browser context and page (tab), initializes debug buffers, optionally sets up monitoring, navigates to the specified URL, stores the page, and sets it as active if none exists.
    async createTab(args) {
      this.ensureBrowserRunning();
      const { tabId, url = 'about:blank', contextId, enableMonitoring = true } = args;
      
      if (this.pages.has(tabId)) {
        throw new Error(`Tab with ID '${tabId}' already exists`);
      }
    
      // Create or reuse context
      const effectiveContextId = contextId || `context-${tabId}`;
      let context;
      
      if (this.contexts.has(effectiveContextId)) {
        context = this.contexts.get(effectiveContextId);
      } else {
        context = await this.browser.newContext({
          storageState: undefined // Start with clean state
        });
        this.contexts.set(effectiveContextId, context);
      }
    
      // Create new page in the context
      const page = await context.newPage();
      
      // Initialize debug buffers
      this.initDebugBuffers(tabId);
      
      // Setup monitoring if enabled
      if (enableMonitoring) {
        await this.setupPageMonitoring(page, tabId);
      }
      
      await page.goto(url);
      this.pages.set(tabId, page);
      
      // Set as active tab if no active tab exists
      if (!this.activeTabId) {
        this.activeTabId = tabId;
      }
    
      return {
        content: [{
          type: 'text',
          text: `Tab '${tabId}' created with debugging ${enableMonitoring ? 'enabled' : 'disabled'}. URL: ${url}. Context: ${effectiveContextId}`
        }]
      };
    }
  • Input schema definition for the 'create_tab' tool, specifying parameters tabId (required), url, contextId, enableMonitoring.
    name: 'create_tab',
    description: 'Create a new tab with isolated session and debugging',
    inputSchema: {
      type: 'object',
      properties: {
        tabId: { type: 'string' },
        url: { type: 'string', default: 'about:blank' },
        contextId: { type: 'string' },
        enableMonitoring: { type: 'boolean', default: true }
      },
      required: ['tabId']
    }
  • Registration/dispatch in the CallToolRequestSchema handler switch statement, calling the createTab method.
    case 'create_tab':
      return await this.createTab(args);
  • Tool registration object in the ListToolsRequestSchema response tools array.
    {
      name: 'create_tab',
      description: 'Create a new tab with isolated session and debugging',
      inputSchema: {
        type: 'object',
        properties: {
          tabId: { type: 'string' },
          url: { type: 'string', default: 'about:blank' },
          contextId: { type: 'string' },
          enableMonitoring: { type: 'boolean', default: true }
        },
        required: ['tabId']
      }
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'isolated session' (suggesting separation from other tabs) and 'debugging' (implying monitoring capabilities), but lacks critical details: whether this requires specific permissions, what 'debugging' entails, how the session isolation works, or what the tool returns. For a creation tool with zero annotation coverage, this is insufficient.

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 extremely concise (7 words) and front-loaded with the core action. Every word earns its place: 'Create' (verb), 'new tab' (resource), 'with isolated session and debugging' (key features). No wasted words or redundant information.

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

Completeness2/5

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

Given 4 parameters with 0% schema coverage, no annotations, and no output schema, the description is incomplete. It doesn't explain parameter meanings, return values, error conditions, or behavioral nuances. While concise, it lacks the necessary detail for a tool that creates resources with debugging capabilities.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It adds no information about any of the 4 parameters (contextId, enableMonitoring, tabId, url) - their purposes, formats, or relationships. The mention of 'debugging' loosely relates to 'enableMonitoring' but provides no semantic clarity. This fails to compensate for the schema gap.

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 clearly states the action ('Create a new tab') and key features ('with isolated session and debugging'), which distinguishes it from basic tab creation. However, it doesn't explicitly differentiate from sibling tools like 'launch_firefox_multi' or 'set_active_tab' that might also involve tab management.

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 like 'launch_firefox_multi' for browser launch or 'navigate' for URL loading. It mentions 'isolated session and debugging' but doesn't explain when this specific capability is needed versus simpler tab operations.

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

Related 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/JediLuke/firefox-mcp-server'

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