browser_navigate
Direct a browser to a specified URL using Playwright MCP, enabling structured web page interactions for LLMs without screenshots or visual models.
Instructions
Navigate to a URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to navigate to |
Implementation Reference
- src/tools/navigate.ts:33-47 (handler)Handler function that executes the browser_navigate tool: ensures a tab, navigates to the given URL, generates equivalent Playwright code snippet, and configures snapshot and network waiting.handle: async (context, params) => { const tab = await context.ensureTab(); await tab.navigate(params.url); const code = [ `// Navigate to ${params.url}`, `await page.goto('${params.url}');`, ]; return { code, captureSnapshot, waitForNetwork: false, }; },
- src/tools/navigate.ts:23-31 (schema)Input schema and metadata for the browser_navigate tool, defining the 'url' parameter and tool properties like name, title, description, and destructive type.schema: { name: 'browser_navigate', title: 'Navigate to a URL', description: 'Navigate to a URL', inputSchema: z.object({ url: z.string().describe('The URL to navigate to'), }), type: 'destructive', },
- src/tools.ts:36-52 (registration)Registration of browser_navigate (via ...navigate(true)) in the snapshotTools array, which collects all tools including the navigate tool factory invoked with captureSnapshot=true.export const snapshotTools: Tool<any>[] = [ ...common(true), ...console, ...dialogs(true), ...files(true), ...install, ...keyboard(true), ...navigate(true), ...network, ...pdf, ...screenshot, ...snapshot, ...tabs(true), ...testing, ...video, ...wait(true), ];
- src/tools.ts:54-69 (registration)Registration of browser_navigate (via ...navigate(false)) in the visionTools array for vision mode.export const visionTools: Tool<any>[] = [ ...common(false), ...console, ...dialogs(false), ...files(false), ...install, ...keyboard(false), ...navigate(false), ...network, ...pdf, ...tabs(false), ...testing, ...video, ...vision, ...wait(false), ];