Skip to main content
Glama
mobile-debug-mcp

mobile-debug-mcp

expect_screen

Verify that an action reached the intended mobile screen by matching an exact screen fingerprint or identifier; returns binary success so navigation outcomes can be confirmed.

Instructions

Purpose: Deterministically verify that the intended navigation outcome of an action has occurred.

Inputs:

  • fingerprint: preferred exact-match screen fingerprint

  • screen: exact semantic screen identifier when a fingerprint is not available

Output Structure:

  • success: true when the expected screen matches the observed screen

  • observed_screen: current fingerprint and screen identifier

  • expected_screen: the expected fingerprint and/or screen identifier

  • confidence: 1 for an exact match, otherwise 0

Recommended Usage:

  1. Define the expected screen before executing the action

  2. Resolve the target element or screen state

  3. Call an action tool such as tap_element

  4. If needed, wait for transition using wait_for_*

  5. Call expect_screen as the final verification step

  6. If success=false, treat the outcome as unverified and follow the action tool retry guidance

Verification Guidance:

  • Primary and authoritative verification tool for navigation outcomes

  • Prefer fingerprint whenever you have one

  • Use screen only as a fallback exact match against known identifiers

  • Works best when the expected screen identifier is known ahead of time

  • If the expected screen is not already known, capture or define it before executing the action

Constraints:

  • Returns structured binary success/failure only

  • Must not rely on natural-language interpretation or reasoning

Failure Handling:

  • success=false means the expected screen was not reached; retry or recover using the action tool's failure strategy

Input Schema

NameRequiredDescriptionDefault
screenNoExpected exact screen identifier when no fingerprint is available.
deviceIdNoOptional device id/udid to target
platformNoOptional platform override (android|ios)
fingerprintNoExpected screen fingerprint. Preferred verification mechanism.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.34.0
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "expectedState"
      +      ]
      +    }
      +  }
      +]
  2. First observedv0.31.0

TDQS

A4.8/5.0
Behavior5/5

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

Since no annotations were provided, the description carries the full burden. It explicitly defines failure handling (success=false means the screen was not reached and suggests retry strategies), constraints (no natural language interpretation), and input preferences (fingerprint preferred over screen).

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?

While lengthy, the definition is exceptionally well-structured. It uses clear headings (Purpose, Inputs, Usage, Constraints, etc.) to organize a large volume of necessary information, making the dense content highly digestible.

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

Completeness5/5

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

Given the complexity of the workflow (requires planning before execution) and the required binary output, the definition is complete. It provides sufficient guidance on definition, execution order, and failure modes.

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

Parameters4/5

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

While the schema is 100% covered, the description adds crucial semantic value by stating the preference order for inputs (fingerprint over screen) and clarifying the purpose of the 'screen' parameter as a fallback exact identifier.

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

Purpose5/5

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

The purpose is stated immediately: to deterministically verify navigation outcomes. It is specific, using technical terms like 'fingerprint' and 'semantic screen identifier,' which clearly distinguishes it from other UI reporting tools.

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

Usage Guidelines5/5

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

The 'Recommended Usage' section provides a detailed step-by-step workflow (1-6) that mandates when and how this tool fits into a broader action-based automation sequence, including defining expectations beforehand and using it as the final verification step.

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