Skip to main content
Glama

page.scroll

Scroll the page or a specific scrollable element to a target, offset, or position; falls back to programmatic scrolling when wheel dispatch stalls.

Instructions

Scroll the page or a specific scrollable element. If wheel dispatch stalls on a busy compositor it falls back to a programmatic scroll and says so via via.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "page.scroll"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
nthNoZero-based index when the locator matches several elements.
refNoSnapshot ref (eNN) from page.snapshot.
textNoVisible text of the element.
xpathNoXPath expression.
delta_xNo
delta_yNo
frame_idNoFrame to search within; see page.list_frames.
selectorNoCSS selector; pierces shadow DOM.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
backend_node_idNoCDP backendNodeId, e.g. from inspector.pick.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only supply readOnlyHint=false and openWorldHint=true, which says little about what happens during a page mutation. The description does add real behavioral context beyond that: wheel dispatch may stall on a busy compositor, in which case the tool falls back to a programmatic scroll and reports the path taken via `via`. That is valuable, but it still does not state whether scrolling waits for settle, is smooth or instant, or what happens if no scrollable element matches.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and followed by the one non-obvious behavioral caveat. Every sentence carries weight, though the fallback detail is dense enough that it could be split for easier parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 12 parameters, zero required, and no output schema, the description covers the action and the fallback correctly but leaves defaults, target resolution precedence among the many locator parameters, and other returned fields unspecified. It is adequate to call the tool, but an agent could not predict how the locator options interact.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, so most parameters (selector, ref, xpath, nth, frame_id, target_id, browser_id) are already documented in the schema and the description correctly does not repeat them. However, the description leaves the key `to` enum (top/bottom/element) and the delta_x/delta_y semantics entirely to the schema, and adds no meaning beyond structured data. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'Scroll the page or a specific scrollable element.' That distinguishes it from siblings like page.click, page.press, and page.pointer without opening a schema. It stops short of naming an alternative tool for non-scroll input, so a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance: nothing tells the agent when to scroll with this tool versus page.press (Page Down), page.pointer, or page.observe. The only conditional detail is an internal failure-handling path, which is about how the tool behaves, not how to choose it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools