Skip to main content
Glama

browser_navigate

Navigate web pages to specified URLs for automated browser interaction and content access.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

Implementation Reference

  • Handler function that ensures a tab exists, navigates to the provided URL, includes a snapshot in the response, and adds the equivalent Playwright code snippet.
    handle: async (context, params, response) => {
      const tab = await context.ensureTab();
      await tab.navigate(params.url);
    
      response.setIncludeSnapshot();
      response.addCode(`await page.goto('${params.url}');`);
    },
  • Tool schema defining the name 'browser_navigate', input with 'url' string parameter, marked as destructive.
    schema: {
      name: 'browser_navigate',
      title: 'Navigate to a URL',
      description: 'Navigate to a URL',
      inputSchema: z.object({
        url: z.string().describe('The URL to navigate to'),
      }),
      type: 'destructive',
    },
  • src/tools.ts:36-52 (registration)
    Registration of all tools in allTools array by importing and spreading modules including navigate.ts which defines browser_navigate.
    export const allTools: Tool<any>[] = [
      ...common,
      ...console,
      ...dialogs,
      ...evaluate,
      ...files,
      ...install,
      ...keyboard,
      ...navigate,
      ...network,
      ...mouse,
      ...pdf,
      ...screenshot,
      ...snapshot,
      ...tabs,
      ...wait,
    ];
  • BrowserServerBackend constructor loads the filtered list of tools from tools.ts, registering browser_navigate among others for the MCP server.
    this._tools = filteredTools(config);

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

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