Skip to main content
Glama

scroll_down

Scrolls down web pages by a specified pixel amount or one full page to view content below the current viewport.

Instructions

Scroll down the page by a pixel amount - if no pixels are specified, scrolls down one page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pixelsNoThe number of pixels to scroll down. If not specified, scrolls down one page.

Implementation Reference

  • The main handler function that executes the scroll_down tool. It scrolls the page down by the specified number of pixels using window.scrollBy, or presses PageDown if no pixels are provided.
    async function handleScrollDown(
      page: Page,
      args: any
    ): Promise<CallToolResult> {
      const { pixels } = args;
      if (pixels !== undefined) {
        await page.evaluate((scrollAmount) => {
          window.scrollBy(0, scrollAmount);
        }, pixels);
      } else {
        await page.keyboard.press("PageDown");
      }
    
      return {
        isError: false,
        content: [
          { type: "text", text: `Scrolled down by ${pixels ?? "one page"}` },
        ],
      };
    }
  • The tool definition including name, description, and input schema for the scroll_down tool. Pixels is an optional integer parameter.
    {
      name: "scroll_down",
      description:
        "Scroll down the page by a pixel amount - if no pixels are specified, scrolls down one page",
      inputSchema: {
        type: "object",
        properties: {
          pixels: {
            type: "integer",
            description:
              "The number of pixels to scroll down. If not specified, scrolls down one page.",
          },
        },
        required: [],
      },
    },
  • src/index.ts:928-929 (registration)
    The switch case in the main tool dispatcher (handleToolCall) that routes scroll_down calls to the handleScrollDown function.
    case "scroll_down":
      result = await handleScrollDown(page, args);

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

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/steel-dev/steel-mcp-server'

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