Skip to main content
Glama
cloudflare

Cloudflare Playwright MCP

Official
by cloudflare

browser_navigate_back

Enables automated browser testing by navigating back to the previous page using Cloudflare Playwright MCP for seamless workflow integration and efficient web interaction.

Instructions

Go back to the previous page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the browser_navigate_back tool by calling goBack on the current browser page/tab.
    handle: async context => { const tab = await context.ensureTab(); await tab.page.goBack(); const code = [ `// Navigate back`, `await page.goBack();`, ]; return { code, captureSnapshot, waitForNetwork: false, }; },
  • Defines the schema for the browser_navigate_back tool, including name, title, description, empty input schema, and readOnly type.
    capability: 'history', schema: { name: 'browser_navigate_back', title: 'Go back', description: 'Go back to the previous page', inputSchema: z.object({}), type: 'readOnly', },
  • Exports the browser_navigate_back tool (via goBack factory) as part of the navigate tools module.
    export default (captureSnapshot: boolean) => [ navigate(captureSnapshot), goBack(captureSnapshot), goForward(captureSnapshot), ];
  • src/tools.ts:35-50 (registration)
    Includes the navigate tools (containing browser_navigate_back) in the snapshotTools array.
    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)
    Includes the navigate tools (containing browser_navigate_back) in the visionTools array.
    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), ];

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/cloudflare/playwright-mcp'

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