Skip to main content
Glama

browser_install

Resolve browser installation errors by installing the browser specified in the configuration file. Use this tool to ensure Playwright MCP server has the required browser for web automation tasks.

Instructions

Install the browser specified in the config. Call this if you get an error about the browser not being installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function that forks the Playwright CLI process to install the browser for the specified channel (default 'chrome'), captures output, and returns a success message.
    handle: async context => { const channel = context.config.browser?.launchOptions?.channel ?? context.config.browser?.browserName ?? 'chrome'; const cliUrl = import.meta.resolve('playwright/package.json'); const cliPath = path.join(fileURLToPath(cliUrl), '..', 'cli.js'); const child = fork(cliPath, ['install', channel], { stdio: 'pipe', }); const output: string[] = []; child.stdout?.on('data', data => output.push(data.toString())); child.stderr?.on('data', data => output.push(data.toString())); await new Promise<void>((resolve, reject) => { child.on('close', code => { if (code === 0) resolve(); else reject(new Error(`Failed to install browser: ${output.join('')}`)); }); }); return { code: [`// Browser ${channel} installed`], captureSnapshot: false, waitForNetwork: false, }; },
  • Schema definition for the 'browser_install' tool, specifying name, title, description, empty input schema, and destructive type.
    schema: { name: 'browser_install', title: 'Install the browser specified in the config', description: 'Install the browser specified in the config. Call this if you get an error about the browser not being installed.', inputSchema: z.object({}), type: 'destructive', },
  • Exports the 'install' tool (which defines 'browser_install') as the default export for registration in the MCP tools system.
    export default [ install, ];

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/Angeluis001/playwright-mcp'

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