Skip to content

scrollUntilTextIsVisible

Scrolls the screen in the specified direction until a target element becomes visible in the view hierarchy.

Provide EXACTLY ONE target: - ‘text’ — substring match: finds elements where this text appears anywhere within the element’s text. - ‘textRegex’ — anchored full-match regex, used verbatim (the same semantics selector tools use), so ‘Loyalty’ matches only “Loyalty” and not “Loyalty Enroll”. Use this when you need an exact match. - (or ‘id’ alone) — scroll until the element with this id is visible.

At least one of ‘text’, ‘textRegex’, or ‘id’ is required; a call with none is rejected (it would match every element). If both ‘text’ and ‘textRegex’ are given, ‘textRegex’ takes precedence. Only provide the additional disambiguation fields (e.g. ‘index’) when multiple elements match the same target.

Source

  • Kind: class-backed
  • Class: xyz.block.trailblaze.toolcalls.commands.ScrollUntilTextIsVisibleTrailblazeTool

Contract

  • Visible to LLM: yes (surface_to_llm: true)
  • Recordable: yes (is_recordable: true)
  • Host-only: no (requires_host: false)

Input schema

Optional parameters

  • textString Text to search for while scrolling (substring match). Provide this OR ‘textRegex’.
  • textRegexString Full-match regex to scroll until visible, used verbatim (anchored, like selector tools). Use instead of ‘text’ for an exact match, e.g. ‘Loyalty’ won’t match ‘Loyalty Enroll’.
  • idString The element id to scroll until. At least one of ‘text’, ‘textRegex’, or ‘id’ is required.
  • indexInteger A 0-based index to disambiguate multiple views with the same text. Default is ‘0’.
  • directionenum(UP | DOWN | RIGHT | LEFT) Direction to scroll. Default is ‘DOWN’.
  • visibilityPercentageInteger Percentage of element visible in viewport. Default is ‘100’.
  • centerElementBoolean If true, keeps scrolling until the found element is near the screen center instead of stopping at first visibility — so a tab bar, sticky footer or promo banner cannot intercept a tap aimed at it. Omit to use the driver-tuned default (true for vertical scrolls on the Android accessibility driver, which needs the extra travel; false elsewhere, including horizontal scrolls, where a correction can carry the target off the opposite edge).
  • scrollStartPositionenum(CENTER | TOP | BOTTOM) Which part of the screen to scroll from. Default is ‘CENTER’.
  • scrollDurationMsInteger Duration in milliseconds of each scroll swipe gesture. Lower is a faster swipe. Omit to use the driver-tuned default (400ms on Android on-device). Set a lower value (e.g. ‘200’) on screens where a slower swipe is misread as a tap.
  • reasoningString

Output

Returns: string (opaque text content)

Typed result schemas (kind: query | action, MCP structuredContent) are not yet carried by the resolved manifest — this section will gain detail when that lands.