Skip to main content
Glama
clivejefferies

mobile-debug-mcp

expect_state

Confirm that a visible UI element's readable state property, such as checked or enabled, equals an expected value. Returns structured success or 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

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

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

Without annotations, the description fully discloses behavior: it returns structured success/failure only, does not infer state when property is unavailable, and lists failure handling for ELEMENT_NOT_FOUND and UNKNOWN. It does not explicitly state it is non-destructive or require permissions, but verification nature implies read-only. Adds important details beyond typical.

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 well-structured with clear sections (Purpose, Inputs, Supported Properties, Verification Guidance, Constraints, Failure Handling). It is front-loaded with the purpose and every sentence contributes value. No unnecessary words or repetitions.

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?

Given no output schema, the description explains that the tool returns 'structured success/failure only' and 'observed value when available'. It covers common failure cases with advice. However, it does not detail the exact structure of the response, which might be needed for parsing. Still, for a verification tool, this is adequate.

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 coverage is high (83%), so baseline is 3. The description lists input parameters (selector/element_id, property, expected, deviceId/platform) and provides a list of supported property values (e.g., checked, selected, focused), which is not in the schema. This adds meaningful guidance for parameter values.

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 tool verifies a readable UI state property on the currently visible element, with a specific verb ('verify') and resource ('UI state property'). This distinguishes it from siblings like expect_element_visible (checks visibility) or expect_screen (checks screen).

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 description provides a 'Verification Guidance' section explaining when to use this tool ('when the UI element is visible but its state must also be confirmed'). It also advises to prefer canonical property names. However, it does not explicitly state when not to use or list alternatives, though context is clear.

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