browser_navigate
Navigate to any URL programmatically as part of automated workflows.
Instructions
Navigate URL
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Implementation Reference
- src/tools/browser_tools.js:105-136 (handler)The main handler function for browser_navigate. Uses Playwright to navigate a page to a given URL, waits for 'domcontentloaded', and returns success with the current URL and page title, or an error message.
async function browserNavigate(url) { try { if (!url) { return { success: false, message: 'URL is required' }; } const page = await getPage(); // Navigate with timeout await page.goto(url, { waitUntil: 'domcontentloaded', timeout: config.timeout }); return { success: true, message: `Navigated to ${url}`, url: page.url(), title: await page.title() }; } catch (error) { logger.error(`Error navigating: ${error.message}`); return { success: false, message: error.message }; } } - src/mcp/server.js:123-123 (schema)Input schema definition for browser_navigate in the MCP server's tool registry. Requires a 'url' string property.
{ name:'browser_navigate', description:'Navigate URL', inputSchema:{ type:'object', properties:{ url:{type:'string'} }, required:['url'] } }, - src/mcp/server.js:123-124 (registration)Tool registration: browser_navigate is listed in the server's tools array with description and input schema.
{ name:'browser_navigate', description:'Navigate URL', inputSchema:{ type:'object', properties:{ url:{type:'string'} }, required:['url'] } }, { name:'applescript_execute', description:'Run AppleScript (macOS)', inputSchema:{ type:'object', properties:{ code_snippet:{type:'string'}, timeout:{type:'number'} }, required:['code_snippet'] } } - src/mcp/server.js:274-274 (handler)Dispatch case in the MCP server's tool call handler that invokes browserTools.browserNavigate(args.url) when 'browser_navigate' is called.
case 'browser_navigate': data = await browserTools.browserNavigate(args.url); break; - src/tools/browser_tools.js:1127-1131 (registration)Export of browserNavigate from browser_tools.js module.
module.exports = { // Navigation browserNavigate, browserNavigateBack, browserNavigateForward,