Skip to main content
Glama
epi-builder
by epi-builder

browser_navigate

Navigate web browsers to specified URLs for automated testing and interaction using Playwright MCP Server's browser automation capabilities.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

Implementation Reference

  • The main handler function for the 'browser_navigate' tool. It ensures a browser and page are available, navigates to the specified URL using Playwright's page.goto(), and returns a confirmation message.
    private async handleNavigate(url: string) { await this.ensureBrowser(); await this.browserState.page!.goto(url); return { content: [ { type: 'text', text: `Navigated to ${url}`, }, ], }; }
  • Input schema definition for the 'browser_navigate' tool, specifying that it requires a 'url' string parameter.
    inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The URL to navigate to', }, }, required: ['url'], },
  • src/server.ts:60-73 (registration)
    Registration of the 'browser_navigate' tool in the list of available tools returned by ListToolsRequestHandler, including name, description, and input schema.
    { name: 'browser_navigate', description: 'Navigate to a URL', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The URL to navigate to', }, }, required: ['url'], }, },
  • Dispatch case in the CallToolRequestHandler switch statement that routes 'browser_navigate' calls to the handleNavigate method.
    case 'browser_navigate': return await this.handleNavigate(args?.url as string);
  • Helper method used by browser_navigate handler to launch Chromium browser and create a new page if not already available.
    private async ensureBrowser() { if (!this.browserState.browser) { this.browserState.browser = await chromium.launch({ headless: false, }); } if (!this.browserState.page) { this.browserState.page = await this.browserState.browser.newPage(); } }

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/epi-builder/mcp-test'

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