Skip to main content
Glama

Robot Actions — Remote Device Control

iOS tap by label

ios_tap_by_label

PREFERRED way to tap on iOS: find a UI element by its accessibility label and tap it in one call via the automation session. No coordinate math, and it works on zero-area elements (e.g. bottom-tab labels) where ios_tap(x,y) would miss. Use this before falling back to ios_tap with raw coordinates. If the element is off-screen it auto-scrolls to bring it into view first (disable with autoScroll:false). On no match, returns similar labels (incl. off-screen) to retry with. If neither the accessibility tree nor auto-scroll finds it, it falls back to reading the screen with OCR and taps the matching on-screen text; the reply says when OCR was used. Requires an active iOS automation session (auto-starts if needed). On a device set to direct-input-only it needs no session: it scrolls the element into view, reads the visible text on the screen to find where it is, taps there, and reports changed (whether the screen changed afterwards). That path needs the label to be visible text; an icon-only control fails fast, so use input:"session" for those.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nearNoDirect-input path only: text of a neighbouring element, to pick between several look-alike labels.
udidYesiOS device UDID
inputNoInput path. 'auto' (default) tries the direct input path first — the one that needs no automation session — and falls back to the session only when the direct path is not usable right now (the response says which one ran). On a device set to direct-input-only, an unusable direct path is reported as an error instead of silently switching to the session. 'hid' forces the direct path with no fallback, reporting 'no HID available' on iOS 17.x or with no tunnel. 'session' forces the automation session even when the direct path would have worked.
labelYesAccessibility label or visible text of the element to tap
matchNoHow to match `label`. Default "contains" — strict, and the only modes that act without interpretation. "fuzzy" tolerates typos and word-order drift, and is tried ONLY after strict finds nothing; it REFUSES when two candidates are too close rather than guessing between them (e.g. "Sign" vs Sign In / Sign Out), and reports which attribute it matched.
autoScrollNoScroll the element into view if off-screen before tapping (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / input
      Added value: +{
      +  "description": "Input path. 'auto' (default) tries the direct input path first — the one that needs no automation session — and falls back to the session only when the direct path is not usable right now (the response says which one ran). On a device set to direct-input-only, an unusable direct path is reported as an error instead of silently switching to the session. 'hid' forces the direct path with no fallback, reporting 'no HID available' on iOS 17.x or with no tunnel. 'session' forces the automation session even when the direct path would have worked.",
      +  "enum": [
      +    "auto",
      +    "hid",
      +    "session"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / near
      Added value: +{
      +  "description": "Direct-input path only: text of a neighbouring element, to pick between several look-alike labels.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / match
      Added value: +{
      +  "description": "How to match `label`. Default \"contains\" — strict, and the only modes that act without interpretation. \"fuzzy\" tolerates typos and word-order drift, and is tried ONLY after strict finds nothing; it REFUSES when two candidates are too close rather than guessing between them (e.g. \"Sign\" vs Sign In / Sign Out), and reports which attribute it matched.",
      +  "enum": [
      +    "exact",
      +    "contains",
      +    "fuzzy"
      +  ],
      +  "type": "string"
      +}
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources