browser_go_back
Navigate to the previous page in a browser instance by specifying its instance ID, enabling seamless backtracking in multi-instance environments.
Instructions
Go back to the previous page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instanceId | Yes | Instance ID |
Implementation Reference
- src/tools.ts:628-648 (handler)The private goBack method that implements the core logic of the browser_go_back tool, executing page.goBack() on the browser instance and handling errors.private async goBack(instanceId: string): Promise<ToolResult> { const instance = this.browserManager.getInstance(instanceId); if (!instance) { return { success: false, error: `Instance ${instanceId} not found` }; } try { await instance.page.goBack(); return { success: true, data: { url: instance.page.url() }, instanceId }; } catch (error) { return { success: false, error: `Go back failed: ${error instanceof Error ? error.message : error}`, instanceId }; } }
- src/tools.ts:125-134 (schema)Input schema for the browser_go_back tool defining the required instanceId parameter.inputSchema: { type: 'object', properties: { instanceId: { type: 'string', description: 'Instance ID' } }, required: ['instanceId'] }
- src/tools.ts:524-525 (registration)Registration in the executeTools switch statement that dispatches browser_go_back calls to the goBack handler.case 'browser_go_back': return await this.goBack(args.instanceId);
- src/tools.ts:123-135 (registration)Tool definition registration in the getTools() array including name, description, and schema.name: 'browser_go_back', description: 'Go back to the previous page', inputSchema: { type: 'object', properties: { instanceId: { type: 'string', description: 'Instance ID' } }, required: ['instanceId'] } },