Skip to main content
Glama

navigate

Direct Firefox browser automation to load a specified URL in a specific tab, enabling efficient navigation and control for multi-tab debugging and testing workflows.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNo
urlYes

Implementation Reference

  • The primary handler for the 'navigate' MCP tool. Retrieves the target browser page (by tabId or active tab), navigates to the provided URL using Playwright's page.goto(), and returns a confirmation message.
    async navigate(args) { this.ensureBrowserRunning(); const { url, tabId } = args; const page = this.getPage(tabId); await page.goto(url); return { content: [{ type: 'text', text: `Tab '${tabId || this.activeTabId}' navigated to: ${url}` }] }; }
  • Input schema definition for the 'navigate' tool, specifying required 'url' parameter and optional 'tabId'.
    { name: 'navigate', description: 'Navigate to a URL', inputSchema: { type: 'object', properties: { url: { type: 'string' }, tabId: { type: 'string' } }, required: ['url'] } },
  • Registration and dispatch of the 'navigate' tool within the CallToolRequestSchema request handler switch statement.
    case 'navigate': return await this.navigate(args);
  • Helper method used by navigate (and other tools) to retrieve the browser Page object for a given tabId or the active tab.
    getPage(tabId) { if (tabId) { if (!this.pages.has(tabId)) { throw new Error(`Tab '${tabId}' not found`); } return this.pages.get(tabId); } else { if (!this.activeTabId || !this.pages.has(this.activeTabId)) { throw new Error('No active tab. Use create_tab or set_active_tab first.'); } return this.pages.get(this.activeTabId); } }

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/JediLuke/firefox-mcp-server'

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