Skip to main content
Glama

execute_browserql

Run GraphQL queries for browser automation tasks, enabling web scraping, performance audits, content extraction, and PDF generation with Browserless.io integration.

Instructions

Execute BrowserQL GraphQL queries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
variablesNo

Implementation Reference

  • Core implementation of execute_browserql: sends POST request to Browserless /chromium/bql endpoint with query and variables.
    async executeBrowserQL(request: BrowserQLRequest): Promise<BrowserlessResponse<BrowserQLResponse>> { try { const response: AxiosResponse<BrowserQLResponse> = await this.httpClient.post('/chromium/bql', request); return { success: true, data: response.data, }; } catch (error) { return this.handleError(error); } }
  • src/index.ts:206-217 (registration)
    MCP tool registration including name, description, and input schema.
    { name: 'execute_browserql', description: 'Execute BrowserQL GraphQL queries', inputSchema: { type: 'object', properties: { query: { type: 'string' }, variables: { type: 'object' }, }, required: ['query'], }, },
  • Zod schema and TypeScript type definition for BrowserQLRequest (input). Similar schema for BrowserQLResponse interface nearby.
    export const BrowserQLRequestSchema = z.object({ query: z.string(), variables: z.record(z.any()).optional(), }); export type BrowserQLRequest = z.infer<typeof BrowserQLRequestSchema>;
  • MCP server handler for the tool: delegates to client.executeBrowserQL and formats MCP response.
    case 'execute_browserql': { if (!args) throw new Error('Arguments are required'); const result = await this.client!.executeBrowserQL(args as any); if (result.success && result.data) { return { content: [ { type: 'text', text: 'BrowserQL query executed successfully.', }, { type: 'text', text: JSON.stringify(result.data, null, 2), }, ], }; } else { throw new Error(result.error || 'Failed to execute BrowserQL query'); } }

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