Skip to main content
Glama

Scroll

scroll

Move the viewport up, down, left, or right by line counts over an element to reveal off-screen content before reading UI state or capturing a screenshot; it does not click or select.

Instructions

Scroll up, down, left or right by a number of lines, over element_id when given so the right pane scrolls. Use it to bring off-screen content into view before get_app_state or screenshot. It only scrolls; nothing is clicked or selected. On macOS it scrolls the target app in the background without moving the user's pointer. On Windows and Linux, without element_id it scrolls whatever is under the user's pointer, and an element with no background route gets the real pointer moved onto it (the result then says via cursor).

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
xNoScreen x to scroll over. Remote control only: the pointer moves there first. Ignored otherwise.
yNoScreen y to scroll over. Remote control only: the pointer moves there first. Ignored otherwise.
amountNoNumber of scroll lines, 1 to 100 (default 5)
directionNoScroll direction (default down)
element_idNoElement to scroll, from get_app_state; the nearest scrollable area around it moves. Omit to scroll the last inspected app (macOS) or whatever is under the pointer (Windows, Linux).
state_queryNoWith return_state, list only elements whose role, label or value contains this text, like get_app_state's query
return_stateNoAfter acting, wait for the app to finish reacting (up to 2 s) and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.1
    • changedInput schema / properties / return_state / description
      Previous value: -"After acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id."New value: +"After acting, wait for the app to finish reacting (up to 2 s) and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id."
  2. Changed2 schema fields changedv0.5.2
    • addedInput schema / properties / return_state
      Added value: +{
      +  "description": "After acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / state_query
      Added value: +{
      +  "description": "With return_state, list only elements whose role, label or value contains this text, like get_app_state's query",
      +  "type": "string"
      +}
  3. Changed2 schema fields changedv0.4.2
    • addedInput schema / properties / x
      Added value: +{
      +  "description": "Screen x to scroll over. Remote control only: the pointer moves there first. Ignored otherwise.",
      +  "type": "number"
      +}
    • addedInput schema / properties / y
      Added value: +{
      +  "description": "Screen y to scroll over. Remote control only: the pointer moves there first. Ignored otherwise.",
      +  "type": "number"
      +}
  4. Changed2 schema fields changedv0.4.0
    • changedInput schema / properties / amount / description
      Previous value: -"Number of scroll lines (default 5)"New value: +"Number of scroll lines, 1 to 100 (default 5)"
    • changedInput schema / properties / element_id / description
      Previous value: -"Element to position the pointer over before scrolling, from get_app_state. Omit to scroll at the current pointer position."New value: +"Element to scroll, from get_app_state; the nearest scrollable area around it moves. Omit to scroll the last inspected app (macOS) or whatever is under the pointer (Windows, Linux)."
  5. Changed3 schema fields changedv0.3.1
    • changedInput schema / properties / amount / description
      Previous value: -"Scroll lines (default 5)"New value: +"Number of scroll lines (default 5)"
    • addedInput schema / properties / direction / description
      Added value: +"Scroll direction (default down)"
    • addedInput schema / properties / element_id / description
      Added value: +"Element to position the pointer over before scrolling, from get_app_state. Omit to scroll at the current pointer position."
  6. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing platform-specific side effects: macOS scrolls the target app in the background without moving the pointer, while Windows/Linux scroll under the pointer and may move the real cursor onto an element with no background route (with a 'via cursor' marker in the result). It also discloses that nothing is clicked or selected, which the readOnlyHint=false / destructiveHint=false annotations alone do not convey.

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?

Front-loaded with the core action and direction, then layered with usage and platform caveats in a compact sequence. It is dense but every clause carries real information; the platform-specific sentences are long but necessary for a cross-platform tool.

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?

With no output schema and 7 optional parameters, the description supplies the behavioral context an agent needs: what triggers scrolling, what happens on each platform, and what the 'via cursor' result marker means. Combined with the fully-covered schema, nothing essential for correct invocation is missing.

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 x, y, amount, direction, element_id, state_query, and return_state are already fully documented. The description adds only marginal meaning, mostly restating element_id's conditional behavior ('over element_id when given') that the schema already spells out for the omit case.

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?

States a specific verb (scroll) plus direction and line count, and scopes the resource to element_id or the app under the pointer. It is immediately distinguishable from siblings like click, drag, and get_app_state, and it explicitly says 'It only scrolls; nothing is clicked or selected.'

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

Usage Guidelines5/5

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

Gives a concrete when-to-use ('bring off-screen content into view before get_app_state or screenshot') and names the follow-up tools that consume the result. The boundary statement ('only scrolls; nothing is clicked or selected') tells the agent when a different sibling (click/select) is required.

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