Skip to main content
Glama
Wladastic

AutoProbeMCP

by Wladastic

launch_browser

Launch a new browser instance to automate web interactions. Choose Chromium, Firefox, or WebKit, run headless or with a custom viewport for testing and scraping.

Instructions

Launch a new browser instance (chromium, firefox, or webkit)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
browserNoBrowser engine to usechromium
headlessNoRun browser in headless mode
viewportNo

Implementation Reference

  • Zod schema defining the input parameters for launch_browser: browser type (chromium/firefox/webkit), headless mode, and optional viewport dimensions.
    const LaunchBrowserSchema = z.object({
      browser: z.enum(['chromium', 'firefox', 'webkit']).default('chromium'),
      headless: z.boolean().default(true),
      viewport: z.object({
        width: z.number().default(1280),
        height: z.number().default(1024)
      }).optional()
    });
  • src/index.ts:131-157 (registration)
    Registration of the 'launch_browser' tool in the ListToolsRequestSchema handler, exposing its name, description, and JSON Schema input definition to MCP clients.
    {
      name: 'launch_browser',
      description: 'Launch a new browser instance (chromium, firefox, or webkit)',
      inputSchema: {
        type: 'object',
        properties: {
          browser: {
            type: 'string',
            enum: ['chromium', 'firefox', 'webkit'],
            default: 'chromium',
            description: 'Browser engine to use'
          },
          headless: {
            type: 'boolean',
            default: true,
            description: 'Run browser in headless mode'
          },
          viewport: {
            type: 'object',
            properties: {
              width: { type: 'number', default: 1280 },
              height: { type: 'number', default: 720 }
            }
          }
        }
      }
    },
  • Handler function that executes the launch_browser tool logic: validates params via Zod schema, closes any existing browser, launches a new Playwright browser (chromium/firefox/webkit), creates a browser context with optional viewport, opens a new page, sets up console log listeners, and returns a success message.
    case 'launch_browser': {
      const params = LaunchBrowserSchema.parse(args);
      
      // Close existing browser if any
      if (currentBrowser) {
        await currentBrowser.close();
      }
    
      // Clear console logs
      consoleLogs = [];
    
      // Launch new browser
      const browserType = params.browser === 'firefox' ? firefox : 
                        params.browser === 'webkit' ? webkit : chromium;
      
      currentBrowser = await browserType.launch({ 
        headless: params.headless 
      });
      
      currentContext = await currentBrowser.newContext({
        viewport: params.viewport ? {
          width: params.viewport.width,
          height: params.viewport.height
        } : undefined
      });
      
      currentPage = await currentContext.newPage();
    
      // Set up console event listener
      currentPage.on('console', (msg) => {
        consoleLogs.push({
          level: msg.type(),
          message: msg.text(),
          timestamp: new Date()
        });
      });
    
      return {
        content: [
          {
            type: 'text',
            text: `Browser ${params.browser} launched successfully ${params.headless ? '(headless)' : '(headed)'}`
          }
        ]
      };
    }
Behavior2/5

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

No annotations provided, and the description only states 'launch' without disclosing side effects like resource consumption, persistence, or the need to later close the instance. The agent is left uninformed about lifecycle management.

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, 10 words, front-loaded with core purpose. No superfluous 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 no output schema, the description should explain return values (e.g., browser instance ID) or effects, but it does not. Nested viewport object lacks any explanatory context. The tool's role in the sequence of operations is unclear.

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?

The description redundantly lists the enum values already in the schema but adds no extra meaning for parameters like headless or viewport. With 67% schema coverage, baseline is 3, but the description fails to add value, reducing the score.

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's purpose: launching a new browser instance with specific browser options (chromium, firefox, webkit). It distinguishes itself from sibling tools (e.g., close_browser, navigate) by being the initialization step.

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?

No guidance on when to use this tool vs alternatives. It is implied as the first step, but no mention of prerequisites, consequences of not closing, or when not to use it (e.g., if a browser already exists).

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/Wladastic/AutoProbeMCP'

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