scroll_up
Scroll up web pages by pixel amounts or full pages to navigate content in Steel MCP Server's browser automation.
Instructions
Scroll up the page by a pixel amount - if no pixels are specified, scrolls up one page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pixels | No | The number of pixels to scroll up. If not specified, scrolls up one page. |
Implementation Reference
- src/index.ts:805-819 (handler)The handler function for the scroll_up tool. It scrolls up the page by the specified pixels or one page using PageUp if not specified.async function handleScrollUp(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("PageUp"); } return { isError: false, content: [{ type: "text", text: `Scrolled up by ${pixels ?? "one page"}` }], }; }
- src/index.ts:538-553 (schema)The input schema and metadata definition for the scroll_up tool, including name, description, and inputSchema.{ name: "scroll_up", description: "Scroll up the page by a pixel amount - if no pixels are specified, scrolls up one page", inputSchema: { type: "object", properties: { pixels: { type: "integer", description: "The number of pixels to scroll up. If not specified, scrolls up one page.", }, }, required: [], }, },
- src/index.ts:931-932 (registration)The switch case in handleToolCall that registers and dispatches to the scroll_up handler.case "scroll_up": result = await handleScrollUp(page, args);