browser_navigate_back
Navigate back to the previous web page in the browsing session using Playwright MCP. Simplifies web interactions by enabling structured accessibility 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:52-56 (handler)The handler function that implements the logic for the browser_navigate_back tool by navigating back in the browser tab and adding the corresponding Playwright code snippet to the response.handle: async (tab, params, response) => { await tab.page.goBack(); response.setIncludeSnapshot(); response.addCode(`await page.goBack();`); },
- src/tools/navigate.ts:44-50 (schema)The schema definition specifying the name, title, description, input schema (empty), and type for the browser_navigate_back tool.schema: { name: 'browser_navigate_back', title: 'Go back', description: 'Go back to the previous page', inputSchema: z.object({}), type: 'readOnly', },
- src/tools/navigate.ts:42-57 (registration)The tool registration using defineTabTool, which defines the capability, schema, and handler for browser_navigate_back.const goBack = defineTabTool({ capability: 'core', schema: { name: 'browser_navigate_back', title: 'Go back', description: 'Go back to the previous page', inputSchema: z.object({}), type: 'readOnly', }, handle: async (tab, params, response) => { await tab.page.goBack(); response.setIncludeSnapshot(); response.addCode(`await page.goBack();`); }, });
- src/tools.ts:44-44 (registration)Includes the tools from navigate.ts (including browser_navigate_back) in the central allTools array export....navigate,
- src/tools.ts:24-24 (registration)Imports the navigate tools module containing browser_navigate_back.import navigate from './tools/navigate.js';