Skip to main content
Glama

ui_scroll

ui_scroll

Scroll the page or a specified container by one viewport in any direction, or bring a selector into view. Returns when the scroll limit is reached so agents can stop looping.

Instructions

Scroll one step. With selector, bring that element into view. Otherwise scroll by one viewport height (or width) in direction (down, up, left, right, or jump to top / bottom, default down): the page, or with container the scroll area matching that selector (a chat panel, a virtual table, a carousel). The result says when the end was reached (nothing more to scroll that way): stop looping then. A page or panel with nothing to scroll is not an error. Selectors containing "nth=" are positional: call ui_get_page_state again after the page changes before reusing them.

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

Input Schema

NameRequiredDescriptionDefault
selectorNoCSS selector, or the `selector` value of an element from ui_get_page_state, passed unchanged; scrolls that element into view. Do not combine with container or direction
containerNoSelector of the scroll area to scroll (a single element); omit to scroll the page
directionNoWhich way to scroll; default down
session_idNoWhich open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose several non-obvious traits: the end-of-scroll signal, that a non-scrollable page is not an error, and that 'nth=' selectors go stale after page changes. It does not say whether scrolling settles/animates or whether a wait is expected before asserting, which is a meaningful omission for a UI-driving tool, but overall transparency is well above baseline.

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?

The modal behavior is front-loaded ('Scroll one step. With `selector`...Otherwise...') and every sentence carries operational information, including the loop-termination hint. It is dense with nested parentheticals, which slightly hurts scanability, but there is no filler.

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

Completeness4/5

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

There is no output schema, and the description compensates by explaining what the result communicates (when the end was reached) and that a non-scrollable target is not a failure. For a 4-parameter, zero-required tool this is nearly complete; only post-scroll settling/timing behavior is left unspecified.

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 description coverage is 100%, so the baseline is 3 and the schema already documents each parameter including the selector/container mutex. The description adds some meaning (container examples such as chat panel, virtual table, carousel, and the default of 'down'), but the parenthetical examples are marginal beyond what the enum and schema text already convey.

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 ('Scroll one step') and then splits behavior into the three distinct modes: element-into-view via `selector`, directional page scrolling, and scroll-area scrolling via `container`. This makes it immediately distinguishable from siblings such as ui_get_page_state or ui_press_key without opening the schema.

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 concrete when-to-use guidance per mode (selector brings an element into view; otherwise scroll by viewport in `direction`; use `container` for a panel, virtual table, or carousel) and adds a stop condition ('stop looping then') plus a selector-reuse caveat pointing back to ui_get_page_state. It stops short of naming any sibling as the preferred alternative for an adjacent case (e.g., keyboard navigation), but the conditional branching is clear.

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