# simulator_scroll_to

> The MCP tool that scrolls the Team's Simulator's screen until an element is visible, without tapping it.

Source: https://air.build/docs/mcp-tools/simulator_scroll_to/

`simulator_scroll_to` scrolls the Team's running Simulator, swipe by swipe, until an element is fully on screen, then stops. It does not tap it: follow with [simulator_tap](https://air.build/docs/mcp-tools/simulator_tap/). An element already on screen needs no swipe. Each swipe moves at most half the scroll area and lets go gently, so the content does not fling past the element. The search ends when the element shows, when the content stops moving (the end of the list), after `maxScrolls` swipes, or after `timeoutSeconds`; a failed search can leave the screen scrolled. One search lasts at most 25 seconds: call it again to keep going.

`direction` says where the content lies, not which way the finger moves: `down` (the default) reveals what is below, so the finger moves up. When the screen has several scroll areas, name the one to scroll with `withinId` or `withinText`: it must match exactly one visible element.

| Read-only | Destructive | Idempotent |
| --- | --- | --- |
| No | No | No |

## Inputs

| Input | Type | Required | Default | What it does |
| --- | --- | --- | --- | --- |
| `teamId` | string (UUID) | Yes | — | The Team, from [list_teams](https://air.build/docs/mcp-tools/list_teams/) |
| `simulator` | string | No | The Team's default device | Which device, by `id` from [list_simulators](https://air.build/docs/mcp-tools/list_simulators/#result) |
| `text` | string | One of `text`, `id`, `nodeId` | — | The element's visible text, as in [Selectors](https://air.build/docs/mcp-tools/simulator_find/#selector) |
| `id` | string | One of `text`, `id`, `nodeId` | — | The element's `accessibilityIdentifier` |
| `nodeId` | string | One of `text`, `id`, `nodeId` | — | A `nodeId` from [simulator_describe_ui](https://air.build/docs/mcp-tools/simulator_describe_ui/) |
| `exact` | boolean | No | `false` | `text` must match exactly |
| `direction` | string: `down`, `up`, `left` or `right` | No | `down` | Where the content to reveal lies |
| `withinId` | string | No | The whole screen | The scroll area, by its `accessibilityIdentifier` |
| `withinText` | string | No | The whole screen | The scroll area, by its text |
| `withinExact` | boolean | No | `false` | `withinText` must match exactly |
| `timeoutSeconds` | number, 0 to 25 | No | `20` | How long to search, in seconds |
| `maxScrolls` | integer, 1 to 100 | No | `25` | The most swipes to make |

## Result

| Field | What |
| --- | --- |
| `ok` | `true` |
| `element`, `point`, `exact`, `matchCount`, `excluded` | The element found, as in [simulator_tap](https://air.build/docs/mcp-tools/simulator_tap/#result) |
| `scrolls` | How many swipes it took |
| `elapsedMs` | How long it took, in milliseconds |

```json
{ "ok": true, "element": { "label": "Settings", "role": "AXCell", "frame": { "x": 0, "y": 610, "width": 402, "height": 44 }, "enabled": true, "interactive": true, "adjustable": false },
  "point": { "x": 201, "y": 632 }, "exact": true, "matchCount": 1, "excluded": [], "scrolls": 3, "elapsedMs": 4200 }
```

## Errors

| Message | When | What to do |
| --- | --- | --- |
| Name the element: text, id or nodeId. | None of the three | Add one |
| direction must be one of down, up, left, right. | Another `direction` | Use one of the four |
| scroll content stopped changing after _n_ swipes without revealing _selector_; reached the end or the gesture did not scroll | The end of the content, or the area does not scroll | Try the other `direction`, or name the scroll area |
| _selector_ not visible after _n_ scroll attempts | `maxScrolls` reached | Call again, or raise `maxScrolls` |
| scroll-to _selector_ did not happen within _n_s | Time ran out | Call again to keep going |
| scroll container _selector_ must match exactly one visible element (found _n_) | `withinId` / `withinText` matched none or several | Narrow it |
| max-scrolls must be between 1 and 100 | `maxScrolls` out of range | Send 1 to 100 |

Plus the errors every Simulator tool can return: see [start_simulator](https://air.build/docs/mcp-tools/start_simulator/#device-errors).

## Example

```json
{"name": "simulator_scroll_to", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "text": "Settings", "direction": "down"}}
```
