Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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}`, }, ], }; } });
  • 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);'); }
  • 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);

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/pshivapr/selenium-mcp'

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