Skip to main content
Glama

Scroll

scroll

Brings elements into view and moves the page or an element by direction or pixel amount with real mouse-wheel events, including in background tabs where Chrome ignores wheel events.

Instructions

Scrolls an element into view (ref), or scrolls the page or the element under a point by a direction/amount using real mouse-wheel events (with script in a background tab, where Chrome ignores wheel events).

Input Schema

NameRequiredDescriptionDefault
xNoViewport X of the element to scroll (default: viewport center).
yNoViewport Y.
refNoElement ref from page_snapshot or find, e.g. "e12".
tabIdNoTab to act on. Defaults to the session target tab (see tab_select).
amountNoPixels to scroll (default: 80% of the viewport).
toEdgeNoScroll the page to its very top or bottom.
directionNoScroll direction.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=false, so the description carries most of the burden. It adds genuinely useful behavioral context: scrolling is performed through real mouse-wheel events (not synthetic DOM manipulation), and a documented background-tab caveat explains the tool's raison d'être. It does not state what happens when conflicting modes are supplied, which is the remaining gap.

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?

Single sentence, front-loaded with the primary verb and modes, with the background-tab rationale tucked into a parenthetical. It's dense but every clause contributes; the nested parenthetical is mildly hard to parse, keeping it off a 5.

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 7 all-optional parameters, no output schema, and three mutually exclusive operating modes, the description should state how modes interact and what is returned (scroll offset, success/failure, element-not-found behavior). It covers the modes but not their interaction or outcome, leaving the agent to guess when the call silently does nothing.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description earns above baseline by conveying the combination rules the schema cannot express: ref selects scroll-into-view, x/y selects element-under-point, direction/amount selects wheel scrolling. It still leaves precedence between modes (e.g., ref plus direction) unstated.

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?

States a specific verb (scrolls) and enumerates the three distinct modes: element into view via ref, page/element-under-point via direction/amount, plus toEdge. No sibling tool overlaps with scrolling, so distinguishing is unnecessary, but the multi-mode enumeration makes the tool's scope concrete.

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

Usage Guidelines4/5

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

The parenthetical about background tabs states the key selection condition: use this rather than injected script because Chrome ignores synthetic wheel events in background tabs. It also implies ref-mode vs point-mode selection. It stops short of explicit exclusion rules (e.g., when to prefer `evaluate` or `navigate` instead).

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