browserNavigate
Directs a web page to a specified URL using a page ID, with optional wait time for snapshot capture, enabling precise browser navigation within automation workflows.
Instructions
导航到指定URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | 页面ID | |
| url | Yes | 要导航的URL | |
| waitForTimeout | No | 操作后等待获取快照的延迟时间(毫秒,默认2000) |
Implementation Reference
- lib/tools/navigate.js:29-34 (handler)Handler function that ensures a tab is open and navigates to the specified URL, includes snapshot in response and adds Playwright code snippet.handle: async (context, params, response) => { const tab = await context.ensureTab(); await tab.navigate(params.url); response.setIncludeSnapshot(); response.addCode(`await page.goto('${params.url}');`); },
- lib/tools/navigate.js:20-28 (schema)Schema definition for the browser_navigate tool including name, title, description, Zod input schema for 'url', 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', },
- lib/tools.js:24-24 (registration)Import of the navigate.js module which defines the browser_navigate tool.import navigate from './tools/navigate.js';
- lib/tools.js:41-41 (registration)Spreading the navigate tools (including browser_navigate) into the allTools array for global tool registration....navigate,
- lib/browserServerBackend.js:32-32 (registration)Initialization of the backend's tools list using filteredTools, which includes browser_navigate, for MCP tool exposure.this._tools = filteredTools(config);