go_back
Navigate to the previous page in browser history using the Steel MCP Server's web navigation tool for Puppeteer-based browsing.
Instructions
Go back to the previous page in the browser history
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:824-842 (handler)The main handler function for the 'go_back' tool. It calls page.goBack() with waitUntil 'domcontentloaded' and returns success or error based on whether there was a previous page.async function handleGoBack(page: Page): Promise<CallToolResult> { const response = await page.goBack({ waitUntil: "domcontentloaded" }); if (!response) { return { isError: true, content: [ { type: "text", text: "Cannot go back. No previous page in the browser history.", }, ], }; } return { isError: false, content: [{ type: "text", text: "Went back to the previous page." }], }; }
- src/index.ts:557-561 (schema)The input schema for the 'go_back' tool, which requires no parameters (empty object).inputSchema: { type: "object", properties: {}, required: [], },
- src/index.ts:554-562 (registration)Registers the 'go_back' tool in the TOOLS array, including its name, description, and schema.{ name: "go_back", description: "Go back to the previous page in the browser history", inputSchema: { type: "object", properties: {}, required: [], }, },
- src/index.ts:934-935 (helper)The switch case in handleToolCall that routes 'go_back' calls to the handler function.case "go_back": result = await handleGoBack(page);