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>;

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