browser_scroll_to_bottom
Scroll to the bottom of web pages to access content that loads dynamically or requires full page navigation for complete visibility.
Instructions
Scroll to the bottom of the page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/actionTools.ts:302-320 (handler)Handler function for the 'browser_scroll_to_bottom' tool, registered inline with server.tool. It retrieves the WebDriver, creates ActionService, and calls scrollToBottom(). Handles success and error responses.server.tool('browser_scroll_to_bottom', 'Scroll to the bottom of the page', {}, async () => { try { const driver = stateManager.getDriver(); const actionService = new ActionService(driver); await actionService.scrollToBottom(); return { content: [{ type: 'text', text: `Scrolled to bottom of the page` }], }; } catch (e) { return { content: [ { type: 'text', text: `Error scrolling to bottom: ${(e as Error).message}`, }, ], }; } });
- src/services/actionService.ts:79-81 (helper)Supporting utility method in ActionService that executes JavaScript to scroll the window to the bottom of the document body.async scrollToBottom(): Promise<void> { await this.driver.executeScript('window.scrollTo(0, document.body.scrollHeight);'); }
- src/tools/index.ts:11-11 (registration)Calls registerActionTools which includes the registration of browser_scroll_to_bottom among other action tools.registerActionTools(server, stateManager);
- src/server.ts:55-55 (registration)Top-level call to register all tools, including action tools with browser_scroll_to_bottom.registerAllTools(this.server, this.stateManager);