Skip to main content
Glama

initialize_browserless

Establish connection to a Browserless instance for browser automation tasks like PDF generation, screenshots, content extraction, and web scraping.

Instructions

Initialize connection to Browserless instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNolocalhost
portNo
tokenYes
protocolNohttp
timeoutNo
concurrentNo

Implementation Reference

  • The handler logic for the 'initialize_browserless' tool. It parses the input arguments with BrowserlessConfigSchema, instantiates BrowserlessClient, retrieves health status, and returns a text response confirming initialization.
    case 'initialize_browserless': {
      const config = BrowserlessConfigSchema.parse(args);
      this.client = new BrowserlessClient(config);
      const health = await this.client.getHealth();
      return {
        content: [
          {
            type: 'text',
            text: `Browserless client initialized successfully. Health status: ${health.data?.status || 'unknown'}`,
          },
        ],
      };
    }
  • The input schema definition for the 'initialize_browserless' tool as registered in the list of available tools.
    {
      name: 'initialize_browserless',
      description: 'Initialize connection to Browserless instance',
      inputSchema: {
        type: 'object',
        properties: {
          host: { type: 'string', default: 'localhost' },
          port: { type: 'number', default: 3000 },
          token: { type: 'string' },
          protocol: { type: 'string', enum: ['http', 'https', 'ws', 'wss'], default: 'http' },
          timeout: { type: 'number', default: 30000 },
          concurrent: { type: 'number', default: 5 },
        },
        required: ['token'],
      },
    },
  • Zod validation schema (BrowserlessConfigSchema) used in the handler to parse and validate the tool's input arguments.
    // Browserless configuration
    export const BrowserlessConfigSchema = z.object({
      host: z.string().default('localhost'),
      port: z.number().default(3000),
      token: z.string(),
      protocol: z.enum(['http', 'https', 'ws', 'wss']).default('http'),
      timeout: z.number().default(30000),
      concurrent: z.number().default(5),
    });
    
    export type BrowserlessConfig = z.infer<typeof BrowserlessConfigSchema>;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Initialize connection' but fails to explain what this entails—e.g., whether it establishes a persistent session, requires authentication, has side effects like resource allocation, or handles errors. For a tool with multiple parameters and no annotations, this leaves critical behavioral traits unclear.

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 a single, clear sentence that efficiently conveys the core action without unnecessary words. It's front-loaded and appropriately sized for its purpose, with no wasted verbiage, making it highly concise and well-structured.

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 the complexity (6 parameters, 1 required, no output schema, and no annotations), the description is incomplete. It doesn't explain the connection's purpose, parameter roles, behavioral implications, or output expectations. For a tool that likely initializes a critical resource, this leaves too much undefined for effective agent use.

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%, meaning parameters are undocumented in the schema. The description adds no information about any parameters, such as explaining what 'token' is for authentication or how 'concurrent' affects performance. With 6 parameters and no compensation in the description, this is a significant gap beyond the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Initialize connection') and target ('to Browserless instance'), which clarifies the basic purpose. However, it doesn't specify what this connection enables or how it differs from sibling tools like 'create_websocket_connection', leaving the scope vague. It avoids tautology by not merely restating the name.

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, such as whether it's a prerequisite for other browser operations or how it relates to siblings like 'create_websocket_connection'. There's no mention of prerequisites, exclusions, or contextual triggers, offering minimal usage direction.

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/Lizzard-Solutions/browserless-mcp'

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