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
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | ||
| url | Yes |
Implementation Reference
- index-multi-debug.js:1038-1048 (handler)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}` }] }; }
- index-multi-debug.js:86-97 (schema)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'] } },
- index-multi-debug.js:407-408 (registration)Registration and dispatch of the 'navigate' tool within the CallToolRequestSchema request handler switch statement.case 'navigate': return await this.navigate(args);
- index-multi-debug.js:1021-1033 (helper)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); } }