Skip to main content
Glama

browser_navigate_back

Navigate back to the previous page in browser automation workflows using Playwright MCP's structured accessibility snapshots.

Instructions

Go back to the previous page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'browser_navigate_back' tool. It ensures a tab exists, calls `page.goBack()` to navigate back, generates corresponding Playwright code snippet, and returns it with snapshot and network wait instructions.
    handle: async context => { const tab = await context.ensureTab(); await tab.page.goBack(); const code = [ `// Navigate back`, `await page.goBack();`, ]; return { code, captureSnapshot, waitForNetwork: false, }; },
  • The schema definition for the 'browser_navigate_back' tool, including name, title, description, empty input schema using Zod, and 'readOnly' type.
    schema: { name: 'browser_navigate_back', title: 'Go back', description: 'Go back to the previous page', inputSchema: z.object({}), type: 'readOnly', },
  • Registers the 'browser_navigate_back' tool (via goBack) in the array exported by the navigate module, which is later imported and spread into main tool lists.
    export default (captureSnapshot: boolean) => [ navigate(captureSnapshot), goBack(captureSnapshot), goForward(captureSnapshot), ];
  • src/tools.ts:43-43 (registration)
    Includes the navigate tools module (containing 'browser_navigate_back') in the snapshotTools array.
    ...navigate(true),
  • src/tools.ts:61-61 (registration)
    Includes the navigate tools module (containing 'browser_navigate_back') in the visionTools array.
    ...navigate(false),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lewisvoncken/playwright-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server