browser_navigate
Navigate web browsers to specified URLs for automated testing, data extraction, and web interaction workflows using Selenium WebDriver.
Instructions
Navigate to a URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to navigate to |
Implementation Reference
- src/tools/browserTools.ts:54-66 (handler)The handler function that executes the tool logic: retrieves the current browser driver from state manager and navigates to the specified URL using driver.get(url). Returns success or error message.async ({ url }) => { try { const driver = stateManager.getDriver(); await driver.get(url); return { content: [{ type: 'text', text: `Navigated to ${url}` }], }; } catch (e) { return { content: [{ type: 'text', text: `Error navigating: ${(e as Error).message}` }], }; } }
- src/tools/browserTools.ts:51-53 (schema)Input schema for the tool, defining a required 'url' parameter as a string with description.{ url: z.string().describe('URL to navigate to'), },
- src/tools/browserTools.ts:48-67 (registration)Direct registration of the 'browser_navigate' tool using server.tool(), including name, description, input schema, and handler function. This occurs within the registerBrowserTools function.server.tool( 'browser_navigate', 'Navigate to a URL', { url: z.string().describe('URL to navigate to'), }, async ({ url }) => { try { const driver = stateManager.getDriver(); await driver.get(url); return { content: [{ type: 'text', text: `Navigated to ${url}` }], }; } catch (e) { return { content: [{ type: 'text', text: `Error navigating: ${(e as Error).message}` }], }; } } );