browser_navigate_back
Navigate to the previous page in a browser session using Playwright MCP's automation capabilities, enabling structured web interactions without visual models.
Instructions
Go back to the previous page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/navigate.ts:60-73 (handler)The handler function that implements the browser_navigate_back tool by navigating back in the browser tab's history and providing the equivalent Playwright code snippet.handle: async context => { const tab = await context.ensureTab(); await tab.page.goBack(); const code = [ `// Navigate back`, `await page.goBack();`, ]; return { code, captureSnapshot, waitForNetwork: false, }; },
- src/tools/navigate.ts:52-58 (schema)Zod schema definition for the browser_navigate_back tool, defining its name, description, empty input schema, and readOnly type.schema: { name: 'browser_navigate_back', title: 'Go back', description: 'Go back to the previous page', inputSchema: z.object({}), type: 'readOnly', },
- src/tools/navigate.ts:100-104 (registration)Exports a factory function that returns an array of navigation tools, including the browser_navigate_back (goBack).export default (captureSnapshot: boolean) => [ navigate(captureSnapshot), goBack(captureSnapshot), goForward(captureSnapshot), ];
- src/tools.ts:35-50 (registration)Registers the navigate tools module (including browser_navigate_back) into the snapshotTools array via spread operator.export const snapshotTools: Tool<any>[] = [ ...common(true), ...console, ...dialogs(true), ...files(true), ...install, ...keyboard(true), ...navigate(true), ...network, ...pdf, ...screenshot, ...snapshot, ...tabs(true), ...testing, ...wait(true), ];
- src/tools.ts:52-66 (registration)Registers the navigate tools module (including browser_navigate_back) into the visionTools array via spread operator.export const visionTools: Tool<any>[] = [ ...common(false), ...console, ...dialogs(false), ...files(false), ...install, ...keyboard(false), ...navigate(false), ...network, ...pdf, ...tabs(false), ...testing, ...vision, ...wait(false), ];