Skip to main content
Glama

navigate

Directs a browser to a specified URL, enabling automated web navigation and interaction for testing or data collection tasks.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

Implementation Reference

  • Handler function for the 'navigate' MCP tool. Destructures the input URL and delegates to the browser wrapper's navigate method, returning a success response with confirmation message.
    handler: async ({ url }) => {
      await browser.navigate(url);
      return { success: true, message: `Navigated to ${url}` };
    }
  • Input schema definition for the 'navigate' tool, specifying a required 'url' parameter of type string.
    inputSchema: {
      type: 'object',
      properties: {
        url: { type: 'string', description: 'The URL to navigate to' }
      },
      required: ['url']
    },
  • Complete registration object for the 'navigate' tool within the createPlaywrightTools function's returned array. This object is included in the main tools list used by the MCP server.
    {
      name: 'navigate',
      description: 'Navigate to a URL',
      inputSchema: {
        type: 'object',
        properties: {
          url: { type: 'string', description: 'The URL to navigate to' }
        },
        required: ['url']
      },
      handler: async ({ url }) => {
        await browser.navigate(url);
        return { success: true, message: `Navigated to ${url}` };
      }
    },
  • Supporting 'navigate' method in SimpleBrowser class. Ensures browser is launched and uses Playwright's page.goto to navigate to the specified URL.
    async navigate(url) {
      await this.ensureLaunched();
      await this.page.goto(url);
    }
  • index.js:74-76 (registration)
    Final registration step in MCP server initialization: calls createTools (which includes 'navigate') to populate the tools array used in MCP tool listing and execution handlers.
    // Register all available automation tools
    const tools = createTools(browser);

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/zypin-testing/zypin-mcp'

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