Skip to main content
Glama
mobile-debug-mcp

mobile-debug-mcp

expect_state

Verify a visible mobile UI element's readable state property—such as checked, enabled, or text value—against an expected value and return structured success/failure.

Instructions

Purpose: Verify a readable UI state property on the currently visible element.

Inputs:

  • selector or element_id

  • property

  • expected

  • platform/deviceId (optional)

Supported properties:

  • checked, selected, focused, expanded, enabled, text_value, value, raw_value

Verification Guidance:

  • Use this when the UI element is visible but its state must also be confirmed

  • Prefer the canonical property names above

  • The tool compares the normalized readable state and returns the observed value when available

Constraints:

  • Returns structured success/failure only

  • Does not infer a state when the property is unavailable

Failure Handling:

  • ELEMENT_NOT_FOUND → re-resolve the element or wait for UI stabilization

  • UNKNOWN → capture a snapshot and stop

Input Schema

NameRequiredDescriptionDefault
deviceIdNoOptional device serial/udid
expectedYesExpected normalized state value.
platformNoOptional platform override
propertyYesReadable state property to verify.
selectorNo
element_idNoOptional previously resolved element identifier.

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.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden well: it states that results are structured success/failure only, that state is not inferred when unavailable, and it documents failure-handling codes. It does not fully describe return fields, but it meaningfully exceeds the schema.

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?

The description is organized into purpose, inputs, supported properties, guidance, constraints, and failure handling. It is front-loaded with the core purpose and every section contributes actionable information without wasted prose.

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

Completeness4/5

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

For a six-parameter tool with no annotations and no output schema, the description does a good job covering when to use it, supported properties, comparison behavior, constraints, and failure modes. The remaining gap is that the structured response shape is described only as success/failure rather than fully specified.

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?

Schema description coverage is high, so the baseline is 3, but the description adds useful semantics by enumerating supported property names such as checked, selected, focused, expanded, enabled, text_value, value, and raw_value. It also clarifies selector or element_id usage and optional platform/deviceId context.

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 states a specific verb and resource: verify a readable UI state property on the currently visible element. It also lists supported properties, making its scope distinguishable from related visibility and screen assertions.

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?

It clearly says to use this tool when the element is visible but its state must also be confirmed, and it recommends canonical property names. It does not explicitly name alternatives such as expect_element_visible or explain when not to use this tool.

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