browser_navigate
Directs a web browser to open a specified URL, enabling automated web navigation for testing or interaction tasks.
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)Handler function that retrieves the current browser driver from stateManager and navigates to the specified URL, returning 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 defining the 'url' parameter as a required string for the browser_navigate tool.{ 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 within registerBrowserTools, specifying name, description, input schema, and inline handler 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}` }], }; } } );