Skip to main content
Glama
mobile-debug-mcp

mobile-debug-mcp

wait_for_ui

Waits for a UI element to exist, become visible, or become clickable, and resolves it before interaction when timing or availability is uncertain.

Instructions

Purpose: Resolve elements and/or detect that a UI transition or availability condition has occurred.

Capabilities:

  • Deterministic element resolution

  • Synchronization when element timing or availability is uncertain

Constraints:

  • Does not verify correctness of the resulting state

  • Must not be used alone to confirm action success when an applicable expect_* tool exists

Recommended Usage:

  1. Use wait_for_ui to resolve an element before acting or to wait for UI readiness

  2. Call the action tool

  3. If the expected outcome is known, follow with expect_* as final verification Device-readiness blockers prevent readiness success; unknown/unsupported device signals remain explicit. Set requireReady=true to require both the existing predicate and settled UI readiness, using the same fresh samples and one timeout budget. The readiness summary explains uncertainty. Default predicate semantics are unchanged.

Input Schema

NameRequiredDescriptionDefault
matchNo
retryNo
deviceIdNoOptional device serial/udid
platformNoOptional platform override
selectorNo
conditionNoexists
timeout_msNo
requireReadyNo
poll_interval_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.34.0
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "expectedState"
      +      ]
      +    }
      +  }
      +]
    • addedInput schema / properties / requireReady
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  2. First observedv0.31.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations supplied, the description does add real behavioral context: it does not verify state correctness, it distinguishes device-readiness blockers from unknown/unsupported signals, and it explains that requireReady shares fresh samples and one timeout budget. It never states whether the call is read-only or what it returns (no output schema exists), and phrases like "unknown/unsupported device signals remain explicit" are too opaque to act on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Headers front-load purpose and constraints well, but the four-section framing is heavy for a 9-param tool and several lines are jargon rather than information ("Device-readiness blockers prevent readiness success; unknown/unsupported device signals remain explicit"). "Default predicate semantics are unchanged" is also a dangling clause with no antecedent.

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?

The workflow and constraint story is genuinely useful for a complex tool, but with 9 parameters, 22% schema coverage, no output schema, and no annotations, the definition leaves too much unexplained — particularly the selector/condition semantics and the shape of what comes back. An agent could place the tool in a workflow but would be guessing on most arguments.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 22% across 9 parameters, so the description needs to compensate and largely does not. It meaningfully explains requireReady and alludes to timeout budget and a "readiness summary," but selector, condition, timeout_ms, poll_interval_ms, match.index, and the retry/backoff fields get no treatment at all.

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?

The description gives a concrete verb-plus-resource purpose ("Resolve elements and/or detect that a UI transition or availability condition has occurred") and frames the tool as a synchronization primitive. It does not, however, distinguish itself from close siblings such as find_element, wait_for_ui_change, or wait_for_screen_change, whose territory it visibly overlaps.

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

Usage Guidelines4/5

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

The "Recommended Usage" section lays out an explicit three-step sequence (wait_for_ui, then the action tool, then expect_* for verification) and the Constraints block states a clear when-not case (do not use alone to confirm success when an expect_* tool exists). It stops short of routing the agent away from find_element or wait_for_ui_change, which is the ambiguity most likely to cause a mis-selection.

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