Skip to main content
Glama

scroll

Moves the page by pixels or viewport heights, brings an element into view, or sends a real wheel event for canvases and maps, then reports before/after positions.

Instructions

Scrolls the window by pixels or viewport heights, or brings an element into view; wheel: true sends a real mouse wheel event instead, for a canvas or map. Returns the window positions {before, after, element_in_view?} and says when nothing moved (on a page that scrolls an inner element, pass a selector inside it).

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": "scroll"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoHorizontal pixels (negative = left).
yNoVertical pixels (negative = up); ignored with 'pages'.
pagesNoViewport heights to scroll (e.g. 1.5; negative = up).
wheelNoSend a real mouse wheel event instead (x, y as deltas in pixels; default 100 down) at 'selector' or the viewport's centre. Default: false.
tab_idNoDefault: the active tab.
selectorNoElement to bring into view (CSS, 'host >>> inner' or a snapshot ref); overrides x, y and pages.
instance_idNoDefault: 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-rc.1

TDQS

A4.4/5.0
Behavior4/5

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

With only destructiveHint=false in the annotations, the description carries most of the burden and does well: it discloses the return shape {before, after, element_in_view?} and that it explicitly reports when nothing moved. It also notes the wheel mode emits a real mouse event rather than a synthesized scroll. It stops short of covering persistence or permission concerns, which are minor for a scroll.

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?

A single long sentence with the primary purpose front-loaded, followed by the wheel variant, return value, and the inner-scroll caveat in that order. It is dense but every clause carries information; the parenthetical nesting makes it slightly harder to scan than an ideal multi-sentence form.

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

Completeness5/5

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

Seven optional parameters, no output schema, and no rich annotations — the description compensates by covering all three modes, the mutual-override rule, and the return/failure reporting. An agent can call this correctly without further context.

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 the baseline is 3; the description adds value beyond it by explaining the purpose of 'wheel' (canvas or map semantics) rather than just its mechanics, and by stating that selector overrides x, y and pages. The inner-element selector tip is a usage insight not present in the schema.

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

Purpose5/5

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

The description opens with a specific verb and resource ('Scrolls the window by pixels or viewport heights, or brings an element into view') and clearly separates the three modes. This distinguishes it cleanly from siblings such as click_element, drag, or hover, which also act on page positions.

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?

It gives real conditional guidance: use 'wheel: true' for a canvas or map, and pass a selector inside the inner element when the page scrolls an inner element. It does not name sibling alternatives or state when not to scroll, but the mode-selection guidance is explicit enough to act on.

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