Skip to main content
Glama
clivejefferies

mobile-debug-mcp

expect_screen

Confirm navigation success by matching the current screen against a predefined fingerprint or exact screen identifier.

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

TableJSON 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.
Behavior5/5

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

With no annotations, the description fully discloses output structure, confidence meaning, constraints (no NLP), and failure handling. Behavior is completely transparent.

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

Conciseness5/5

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

Well-structured with clear sections, front-loaded purpose, and every sentence adds value. No redundancy.

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?

Covers inputs, outputs, usage, failure handling, and constraints comprehensively. No output schema exists, but description compensates fully.

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

Parameters5/5

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

Schema coverage is 100% with descriptions, and the description adds meaningful context (preference for fingerprint, fallback to screen) beyond the schema.

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 description clearly states the verb 'verify' and the resource 'navigation outcome' with deterministic exact matching. It distinguishes from siblings like get_current_screen and wait_for_screen_change.

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?

Provides step-by-step recommended usage and guidance on fallback from fingerprint to screen. However, it does not explicitly contrast with alternatives like expect_element_visible or discuss when not to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/clivejefferies/mobile-debug-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server