playwright_go_back
Simulate browser back button functionality to navigate to the previous page in the browsing history using Playwright MCP Server.
Instructions
Navigate back in browser history
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "playwright_go_back"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/browser/navigation.ts:96-106 (handler)The GoBackTool class implements the core logic for the 'playwright_go_back' tool by calling page.goBack() on the Playwright page instance.
export class GoBackTool extends BrowserToolBase { /** * Execute the go back tool */ async execute(args: any, context: ToolContext): Promise<ToolResponse> { return this.safeExecute(context, async (page) => { await page.goBack(); return createSuccessResponse("Navigated back in browser history"); }); } } - src/tools.ts:335-343 (schema)The input schema definition for the 'playwright_go_back' tool, specifying no required parameters.
{ name: "playwright_go_back", description: "Navigate back in browser history", inputSchema: { type: "object", properties: {}, required: [], }, }, - src/toolHandler.ts:518-519 (registration)Registration and dispatch in the main tool handler switch statement, routing calls to the GoBackTool instance.
case "playwright_go_back": return await goBackTool.execute(args, context); - src/toolHandler.ts:311-311 (registration)Instantiation of the GoBackTool instance during tool initialization.
if (!goBackTool) goBackTool = new GoBackTool(server); - src/toolHandler.ts:41-41 (registration)Import of the GoBackTool class from its implementation file.
import { GoBackTool, GoForwardTool } from "./tools/browser/navigation.js";