Skip to main content
Glama

find

Find by text/label/value/role/id and run action. The role locator matches snapshot kind vocabulary (button, text, text-field, switch, ...); pre-reconciliation leaf spellings (statictext, edittext, textview) stay accepted on the nodes that…

Instructions

Find by text/label/value/role/id and run action. The role locator matches snapshot kind vocabulary (button, text, text-field, switch, ...); pre-reconciliation leaf spellings (statictext, edittext, textview) stay accepted on the nodes that carried them during a deprecation window. Times out after 90s.

Input Schema

NameRequiredDescriptionDefault
rawNo
lastNo
udidNoApple device or simulator UDID; the selector that pins one device when several share a name.
debugNoEnable debug diagnostics.
depthNo
firstNo
queryYes
runIdNoLease run identifier.
valueNo
actionNo
deviceNoDevice name selector (a UDID belongs in udid, a serial in serial).
recordNoForce-record this out-of-band observation into a repair-armed heal (mutually exclusive with noRecord). Authored replay steps are recorded automatically and never need this. On find, valid only for a read-only action.
serialNoAndroid, HarmonyOS, or Vega VVD serial selector.
targetNoAlias for deviceTarget on commands without a UI target field. Interaction commands reserve target for the UI element.
tenantNoRemote tenant identifier.
leaseIdNoExisting lease identifier.
locatorNo
sessionNoAgent-device session name.
noRecordNoDo not record this action.
platformNoPlatform selector used to resolve a device.
timeoutMsNo
includeCostNoInclude per-command agent-cost (cost.wallClockMs, …) in structuredContent. Defaults to off; the default response shape is unchanged.
deviceTargetNoDevice target form. Maps to the CLI --target flag.
responseLevelNoResponse verbosity: token-cheap digest / default (today) / full. Defaults to default; the default response shape is unchanged.
mcpOutputFormatNoMCP text content format. Defaults to optimized agent-friendly text; use json for JSON text. Structured content is always returned separately.
androidDeviceAllowlistNoAndroid serial allowlist used for device resolution.

Output Schema

NameRequiredDescriptionDefault
xNoResolved x coordinate for mutating find actions.
yNoResolved y coordinate for mutating find actions.
refNoSnapshot ref without the @ prefix when the find action returns one.
costNo
nodeNoSnapshot node for find get_attrs/get_text.
textNoText value returned by find get_text.
foundNoWhether a wait/exists/read-only find satisfied its condition.
queryNoQuery argument used for the find action.
locatorNoLocator kind used for the find action.
matchesNoEvery match for the read-only find list action (#1625): { ref, node } each.
messageNoDiagnostic message for mutating find actions.
waitedMsNoMilliseconds waited for a read-only find condition.
refsGenerationNoADR 0014 ref frame epoch for read-only find actions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.21.0
    • changedInput schema / properties / device / description
      Previous value: -"Device name selector."New value: +"Device name selector (a UDID belongs in udid, a serial in serial)."
    • changedInput schema / properties / serial / description
      Previous value: -"Android device or Vega VVD serial selector."New value: +"Android, HarmonyOS, or Vega VVD serial selector."
    • changedInput schema / properties / udid / description
      Previous value: -"iOS device UDID selector."New value: +"Apple device or simulator UDID; the selector that pins one device when several share a name."
  2. Changed9 schema fields changedv0.20.10
    • removedInput schema / properties / cwd
      Removed value: -{
      -  "description": "Working directory for command execution.",
      -  "type": "string"
      -}
    • removedInput schema / properties / daemonAuthToken
      Removed value: -{
      -  "description": "Remote daemon auth token.",
      -  "type": "string"
      -}
    • removedInput schema / properties / daemonBaseUrl
      Removed value: -{
      -  "description": "Remote daemon base URL.",
      -  "type": "string"
      -}
    • removedInput schema / properties / iosSimulatorDeviceSet
      Removed value: -{
      -  "description": "iOS simulator device-set path used for device resolution.",
      -  "type": "string"
      -}
    • removedInput schema / properties / iosXctestDerivedDataPath
      Removed value: -{
      -  "description": "Derived data path for external iOS XCTest runner execution.",
      -  "type": "string"
      -}
    • removedInput schema / properties / iosXctestEnvDir
      Removed value: -{
      -  "description": "Writable directory for iOS XCTest runner env overlays.",
      -  "type": "string"
      -}
    • removedInput schema / properties / iosXctestrunFile
      Removed value: -{
      -  "description": "Externally built iOS XCTest runner .xctestrun artifact path.",
      -  "type": "string"
      -}
    • removedInput schema / properties / stateDir
      Removed value: -{
      -  "description": "Agent-device state directory.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / settle
      Removed value: -{
      -  "properties": {
      -    "captures": {
      -      "type": "number"
      -    },
      -    "diff": {
      -      "description": "Settled diff vs the pre-action tree (changed lines only).",
      -      "properties": {
      -        "lines": {
      -          "items": {
      -            "properties": {
      -              "kind": {
      -                "enum": [
      -                  "added",
      -                  "removed"
      -                ],
      -                "type": "string"
      -              },
      -              "ref": {
      -                "description": "Plain ref body (e12) for added lines.",
      -                "type": "string"
      -              },
      -              "text": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind",
      -              "text"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        },
      -        "summary": {
      -          "properties": {
      -            "additions": {
      -              "type": "number"
      -            },
      -            "removals": {
      -              "type": "number"
      -            },
      -            "unchanged": {
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "additions",
      -            "removals",
      -            "unchanged"
      -          ],
      -          "type": "object"
      -        },
      -        "truncated": {
      -          "description": "Lines were capped to the response bound.",
      -          "type": "boolean"
      -        }
      -      },
      -      "required": [
      -        "summary",
      -        "lines"
      -      ],
      -      "type": "object"
      -    },
      -    "hint": {
      -      "type": "string"
      -    },
      -    "quietMs": {
      -      "type": "number"
      -    },
      -    "refs": {
      -      "items": {
      -        "properties": {
      -          "ref": {
      -            "description": "Plain ref body (e12) minted from the stored settled tree.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "ref"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "refsGeneration": {
      -      "description": "Snapshot generation of the stored settled tree; refs on added diff lines were minted from it.",
      -      "type": "number"
      -    },
      -    "settled": {
      -      "description": "Whether the UI held the quiet window before the deadline. false is advisory, not failure.",
      -      "type": "boolean"
      -    },
      -    "tail": {
      -      "description": "Unchanged interactive refs tail: still-present, actionable elements from the settled tree, attached only when diff carries zero added-line refs (a modal-dismiss/toast-only diff).",
      -      "items": {
      -        "properties": {
      -          "label": {
      -            "type": "string"
      -          },
      -          "ref": {
      -            "description": "Plain ref body (e12) minted from the stored settled tree.",
      -            "type": "string"
      -          },
      -          "role": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "ref",
      -          "role"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "tailTruncated": {
      -      "description": "Present (true) when tail candidates exceeded the response cap.",
      -      "type": "boolean"
      -    },
      -    "timeoutMs": {
      -      "type": "number"
      -    },
      -    "waitedMs": {
      -      "type": "number"
      -    }
      -  },
      -  "required": [
      -    "settled",
      -    "waitedMs",
      -    "captures",
      -    "quietMs",
      -    "timeoutMs"
      -  ],
      -  "type": "object"
      -}
  3. Changed1 schema field changedv0.20.9
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "apple",
      -  "android",
      -  "vega",
      -  "linux",
      -  "web",
      -  "ios",
      -  "macos"
      -]New value: +[
      +  "apple",
      +  "android",
      +  "harmonyos",
      +  "vega",
      +  "linux",
      +  "web",
      +  "ios",
      +  "macos"
      +]
  4. Changed2 schema fields changedv0.20.6
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "click",
      -  "focus",
      -  "exists",
      -  "getText",
      -  "getAttrs",
      -  "wait",
      -  "fill",
      -  "type"
      -]New value: +[
      +  "click",
      +  "focus",
      +  "exists",
      +  "list",
      +  "getText",
      +  "getAttrs",
      +  "wait",
      +  "fill",
      +  "type"
      +]
    • addedOutput schema / properties / matches
      Added value: +{
      +  "description": "Every match for the read-only find list action (#1625): { ref, node } each.",
      +  "items": {
      +    "additionalProperties": true,
      +    "description": "One listed match with its snapshot ref and node.",
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  5. Changed5 schema fields changedv0.20.2
    • addedInput schema / properties / noRecord
      Added value: +{
      +  "description": "Do not record this action.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "apple",
      -  "android",
      -  "linux",
      -  "web",
      -  "ios",
      -  "macos"
      -]New value: +[
      +  "apple",
      +  "android",
      +  "vega",
      +  "linux",
      +  "web",
      +  "ios",
      +  "macos"
      +]
    • addedInput schema / properties / record
      Added value: +{
      +  "description": "Force-record this out-of-band observation into a repair-armed heal (mutually exclusive with noRecord). Authored replay steps are recorded automatically and never need this. On find, valid only for a read-only action.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / serial / description
      Previous value: -"Android serial selector."New value: +"Android device or Vega VVD serial selector."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Daemon response data for the find command.",
      +  "properties": {
      +    "cost": {
      +      "properties": {
      +        "nodeCount": {
      +          "description": "Number of nodes in the original node tree when the response carries one.",
      +          "type": "number"
      +        },
      +        "runnerRoundTrips": {
      +          "description": "Number of real runner round-trips made while serving the request.",
      +          "type": "number"
      +        },
      +        "wallClockMs": {
      +          "description": "Total wall-clock time for the request in milliseconds.",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "wallClockMs",
      +        "runnerRoundTrips"
      +      ],
      +      "type": "object"
      +    },
      +    "found": {
      +      "description": "Whether a wait/exists/read-only find satisfied its condition.",
      +      "type": "boolean"
      +    },
      +    "locator": {
      +      "description": "Locator kind used for the find action.",
      +      "type": "string"
      +    },
      +    "message": {
      +      "description": "Diagnostic message for mutating find actions.",
      +      "type": "string"
      +    },
      +    "node": {
      +      "additionalProperties": true,
      +      "description": "Snapshot node for find get_attrs/get_text.",
      +      "type": "object"
      +    },
      +    "query": {
      +      "description": "Query argument used for the find action.",
      +      "type": "string"
      +    },
      +    "ref": {
      +      "description": "Snapshot ref without the @ prefix when the find action returns one.",
      +      "type": "string"
      +    },
      +    "refsGeneration": {
      +      "description": "ADR 0014 ref frame epoch for read-only find actions.",
      +      "type": "number"
      +    },
      +    "settle": {
      +      "properties": {
      +        "captures": {
      +          "type": "number"
      +        },
      +        "diff": {
      +          "description": "Settled diff vs the pre-action tree (changed lines only).",
      +          "properties": {
      +            "lines": {
      +              "items": {
      +                "properties": {
      +                  "kind": {
      +                    "enum": [
      +                      "added",
      +                      "removed"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "ref": {
      +                    "description": "Plain ref body (e12) for added lines.",
      +                    "type": "string"
      +                  },
      +                  "text": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "kind",
      +                  "text"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "summary": {
      +              "properties": {
      +                "additions": {
      +                  "type": "number"
      +                },
      +                "removals": {
      +                  "type": "number"
      +                },
      +                "unchanged": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "additions",
      +                "removals",
      +                "unchanged"
      +              ],
      +              "type": "object"
      +            },
      +            "truncated": {
      +              "description": "Lines were capped to the response bound.",
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "summary",
      +            "lines"
      +          ],
      +          "type": "object"
      +        },
      +        "hint": {
      +          "type": "string"
      +        },
      +        "quietMs": {
      +          "type": "number"
      +        },
      +        "refs": {
      +          "items": {
      +            "properties": {
      +              "ref": {
      +                "description": "Plain ref body (e12) minted from the stored settled tree.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "ref"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "refsGeneration": {
      +          "description": "Snapshot generation of the stored settled tree; refs on added diff lines were minted from it.",
      +          "type": "number"
      +        },
      +        "settled": {
      +          "description": "Whether the UI held the quiet window before the deadline. false is advisory, not failure.",
      +          "type": "boolean"
      +        },
      +        "tail": {
      +          "description": "Unchanged interactive refs tail: still-present, actionable elements from the settled tree, attached only when diff carries zero added-line refs (a modal-dismiss/toast-only diff).",
      +          "items": {
      +            "properties": {
      +              "label": {
      +                "type": "string"
      +              },
      +              "ref": {
      +                "description": "Plain ref body (e12) minted from the stored settled tree.",
      +                "type": "string"
      +              },
      +              "role": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "ref",
      +              "role"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "tailTruncated": {
      +          "description": "Present (true) when tail candidates exceeded the response cap.",
      +          "type": "boolean"
      +        },
      +        "timeoutMs": {
      +          "type": "number"
      +        },
      +        "waitedMs": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "settled",
      +        "waitedMs",
      +        "captures",
      +        "quietMs",
      +        "timeoutMs"
      +      ],
      +      "type": "object"
      +    },
      +    "text": {
      +      "description": "Text value returned by find get_text.",
      +      "type": "string"
      +    },
      +    "waitedMs": {
      +      "description": "Milliseconds waited for a read-only find condition.",
      +      "type": "number"
      +    },
      +    "x": {
      +      "description": "Resolved x coordinate for mutating find actions.",
      +      "type": "number"
      +    },
      +    "y": {
      +      "description": "Resolved y coordinate for mutating find actions.",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  6. Changed3 schema fields changedv0.17.11
    • addedInput schema / properties / includeCost
      Added value: +{
      +  "description": "Include per-command agent-cost (cost.wallClockMs, …) in structuredContent. Defaults to off; the default response shape is unchanged.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "ios",
      -  "macos",
      -  "android",
      -  "linux",
      -  "web",
      -  "apple"
      -]New value: +[
      +  "apple",
      +  "android",
      +  "linux",
      +  "web",
      +  "ios",
      +  "macos"
      +]
    • addedInput schema / properties / responseLevel
      Added value: +{
      +  "description": "Response verbosity: token-cheap digest / default (today) / full. Defaults to default; the default response shape is unchanged.",
      +  "enum": [
      +    "digest",
      +    "default",
      +    "full"
      +  ],
      +  "type": "string"
      +}
  7. Changed1 schema field changedv0.17.7
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "ios",
      -  "macos",
      -  "android",
      -  "linux",
      -  "apple"
      -]New value: +[
      +  "ios",
      +  "macos",
      +  "android",
      +  "linux",
      +  "web",
      +  "apple"
      +]
  8. Changed5 schema fields changedv0.17.6
    • addedInput schema / properties / iosXctestDerivedDataPath
      Added value: +{
      +  "description": "Derived data path for external iOS XCTest runner execution.",
      +  "type": "string"
      +}
    • addedInput schema / properties / iosXctestEnvDir
      Added value: +{
      +  "description": "Writable directory for iOS XCTest runner env overlays.",
      +  "type": "string"
      +}
    • addedInput schema / properties / iosXctestrunFile
      Added value: +{
      +  "description": "Externally built iOS XCTest runner .xctestrun artifact path.",
      +  "type": "string"
      +}
    • addedInput schema / properties / mcpOutputFormat
      Added value: +{
      +  "description": "MCP text content format. Defaults to optimized agent-friendly text; use json for JSON text. Structured content is always returned separately.",
      +  "enum": [
      +    "optimized",
      +    "json"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "ios",
      -  "android",
      -  "macos",
      -  "linux",
      -  "apple"
      -]New value: +[
      +  "ios",
      +  "macos",
      +  "android",
      +  "linux",
      +  "apple"
      +]
  9. First observedv0.16.9

TDQS

B3.2/5.0
Behavior3/5

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

No annotations, so the description carries the full burden. It usefully discloses a 90s timeout and the pre-reconciliation spelling behavior during a deprecation window, which are non-obvious traits. However, it says nothing about whether actions mutate state, permission/prerequisite needs, or how recording interacts with actions despite a record param existing.

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?

Core behavior is front-loaded in the first sentence, followed by a role/deprecation clarification and a timeout note. Every sentence contributes, though the middle clause is dense and could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be explained, and the description covers locators, role vocabulary, and timeout. But for a 26-parameter tool spanning device/session/lease selectors, the description does little to orient an agent on the large selector surface, leaving much of the complexity to the schema.

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 coverage is 65%, with many selector params (device, serial, udid, session, lease, target) documented in the schema itself. The description adds meaning for the locator/role vocabulary and role matches against snapshot kinds, but does not clarify query vs value vs id semantics. Baseline 3 is appropriate given the partial schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (find) plus the locator dimensions it searches and that it will run an action on the match. This distinguishes it from pure interaction siblings like click/fill, though it doesn't explicitly name which sibling to prefer for narrow cases such as get or snapshot.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance or comparison to sibling locators/commands (get, is, snapshot, click). The agent must infer that find is the general locate-and-act path, and the deprecation-window note adds detail but not usage routing.

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