Skip to main content
Glama

Robot Actions — Remote Device Control

iOS find element

ios_find_element
Read-onlyIdempotent

Find a UI element on an iOS device by its accessibility label or text. Returns the element center coordinates (x, y), bounds, and which strategy matched. On no match, returns similar visible labels to retry with. Prefer this (or ios_tap_by_label) over eyeballing coordinates from a screenshot. Requires an active iOS automation session (auto-starts if needed). On a device set to direct-input-only it needs no session: it answers from the screen's accessibility tree in well under a second and returns the element's label, type, value and match score, but NO coordinates. Pass input:"session" to force the session lookup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoElement type filter e.g. XCUIElementTypeButton, XCUIElementTypeCell (optional, used in class chain)
udidYesiOS device UDID
inputNoLookup path. 'auto' (default) follows the device's mode: direct-input-only devices look up without a session (no coordinates returned). 'session' forces the automation-session lookup, which returns coordinates. 'hid' forces the session-free lookup.
labelYesAccessibility label or visible text of the element to find
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.
strategyNoElement finding strategy to try first. Defaults to trying class chain → predicate string → accessibility id → name → xpath in order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / input
      Added value: +{
      +  "description": "Lookup path. 'auto' (default) follows the device's mode: direct-input-only devices look up without a session (no coordinates returned). 'session' forces the automation-session lookup, which returns coordinates. 'hid' forces the session-free lookup.",
      +  "enum": [
      +    "auto",
      +    "hid",
      +    "session"
      +  ],
      +  "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