browser_navigate_forward
Move forward to the next page in the browser session using the Playwright MCP server’s browser automation capabilities.
Instructions
Go forward to the next page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/navigate.ts:85-97 (handler)Handler function that executes the browser_navigate_forward tool by calling goForward on the current browser tab's page and generating corresponding code snippet.handle: async context => { const tab = context.currentTabOrDie(); await tab.page.goForward(); const code = [ `// Navigate forward`, `await page.goForward();`, ]; return { code, captureSnapshot, waitForNetwork: false, }; },
- src/tools/navigate.ts:78-84 (schema)Input schema and metadata definition for the browser_navigate_forward tool, using Zod for validation (no inputs required).schema: { name: 'browser_navigate_forward', title: 'Go forward', description: 'Go forward to the next page', inputSchema: z.object({}), type: 'readOnly', },
- src/tools/navigate.ts:76-98 (registration)Tool factory registration for browser_navigate_forward using defineTool, which creates the tool instance based on captureSnapshot.const goForward: ToolFactory = captureSnapshot => defineTool({ capability: 'history', schema: { name: 'browser_navigate_forward', title: 'Go forward', description: 'Go forward to the next page', inputSchema: z.object({}), type: 'readOnly', }, handle: async context => { const tab = context.currentTabOrDie(); await tab.page.goForward(); const code = [ `// Navigate forward`, `await page.goForward();`, ]; return { code, captureSnapshot, waitForNetwork: false, }; }, });
- src/tools.ts:23-42 (registration)Import and inclusion of navigate tools (including browser_navigate_forward) into the snapshotTools array for tool registration.import navigate from './tools/navigate.js'; import network from './tools/network.js'; import pdf from './tools/pdf.js'; import snapshot from './tools/snapshot.js'; import tabs from './tools/tabs.js'; import screenshot from './tools/screenshot.js'; import testing from './tools/testing.js'; import vision from './tools/vision.js'; import wait from './tools/wait.js'; import type { Tool } from './tools/tool.js'; export const snapshotTools: Tool<any>[] = [ ...common(true), ...console, ...dialogs(true), ...files(true), ...install, ...keyboard(true), ...navigate(true),