browser_navigate_back
Navigate back to the previous web page in the browser history using the Playwright MCP server's structured accessibility snapshots.
Instructions
Go back to the previous page
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/navigate.ts:52-56 (handler)Handler function that executes the goBack action on the browser tab's page, includes a snapshot in the response, and appends the equivalent Playwright code.
handle: async (tab, params, response) => { await tab.page.goBack(); response.setIncludeSnapshot(); response.addCode(`await page.goBack();`); }, - src/tools/navigate.ts:44-50 (schema)Schema defining the tool's name, title, description, empty input schema (no parameters), 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.ts:36-52 (registration)Global registration of all tools, including browser_navigate_back via spread of imported navigate tools array.
export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ]; - src/tools/navigate.ts:75-79 (registration)Local export of the tool (goBack) as part of the navigate tools array for higher-level registration.
export default [ navigate, goBack, goForward, ];