Skip to main content
Glama
mobile-debug-mcp

mobile-debug-mcp

restart_app

Restart an Android or iOS app by platform and app ID, optionally targeting a device, to return it to a known state for debugging and verification.

Instructions

Purpose: Restart a mobile app on Android or iOS.

Inputs:

  • platform

  • appId

  • deviceId (optional)

Output Structure:

  • action_id, timestamp (ISO 8601), action_type

  • lifecycle_state: post-dispatch lifecycle state (pending_verification or failed)

  • source_module: runtime source of the action envelope

  • target.selector = { appId }

  • success = true when the restart command completed

  • failure_code/retryable when restart dispatch fails

  • ui_fingerprint_before/ui_fingerprint_after when available

Recommended Usage:

  1. Define the expected landing screen when it is known

  2. Call restart_app

  3. If needed, wait for transition using wait_for_*

  4. Verify with expect_screen

  5. If verification fails, retry once or capture a snapshot

Verification Guidance:

  • Follow RESOLVE → ACT → WAIT (if needed) → EXPECT

  • expect_screen is the authoritative verification step when the reopened screen is known

  • Do not treat timing or screen change alone as final verification

Failure Handling:

  • TIMEOUT → retry once

  • UNKNOWN → inspect snapshot/logs before retrying Compact results summarize observations, condition trees, state deltas and readiness probe evidence within a byte budget. Use get_interaction_diagnostics with the returned diagnostics session_id/result_id to retrieve the original result without replaying input. Debug output is unchanged. Results include device_readiness with timestamped device blocker evidence. Android reports supported power/keyguard signals; iOS signals may be unknown or explicitly unsupported. Launch/input dispatch success does not establish app visibility or input readiness. No automatic unlock or wake is performed.

Input Schema

NameRequiredDescriptionDefault
appIdYesAndroid package name or iOS bundle id
deviceIdNoDevice UDID (iOS) or Serial (Android). Defaults to booted/connected.
platformYes
responseModeNodebug
actionTimeoutMsNoDispatch budget in milliseconds, clamped to 100–30000.
verificationModeNofull
verificationTimeoutMsNoLight observation budget in milliseconds, clamped to 100–60000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.34.0
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "expectedState"
      +      ]
      +    }
      +  }
      +]
    • addedInput schema / properties / actionTimeoutMs
      Added value: +{
      +  "description": "Dispatch budget in milliseconds, clamped to 100–30000.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / responseMode
      Added value: +{
      +  "default": "debug",
      +  "enum": [
      +    "compact",
      +    "debug"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / verificationMode
      Added value: +{
      +  "default": "full",
      +  "enum": [
      +    "none",
      +    "light",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / verificationTimeoutMs
      Added value: +{
      +  "description": "Light observation budget in milliseconds, clamped to 100–60000.",
      +  "type": "integer"
      +}
  2. First observedv0.31.0

TDQS

A4/5.0
Behavior5/5

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

With no annotations present the description carries the full burden and does so well: it discloses the response envelope (action_id, lifecycle_state of pending_verification/failed, failure_code/retryable), retry policy, and the important caveat that dispatch success does not establish app visibility or input readiness and that no automatic unlock or wake occurs. That last point is a non-obvious behavioral trait an agent would otherwise mis-assume.

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 make it scannable and the purpose is front-loaded, but the output-structure bullets are inconsistent in format and the final paragraph on compact results, diagnostics session_id/result_id and device_readiness is generic runtime boilerplate that dilutes the restart-specific content. 'Recommended Usage' and 'Verification Guidance' also overlap substantially on the expect_screen step.

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 7-parameter mutation tool with no output schema, the description is unusually complete — it spells out the return shape, failure modes and verification contract. Gaps remain around the verification-mode/timeout parameters and the restart-vs-start/terminate decision, which matter for correct invocation.

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

Parameters3/5

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

The 'Inputs' block only restates platform, appId and deviceId, which the schema already documents at 57% coverage; the four operational knobs (responseMode, verificationMode, actionTimeoutMs, verificationTimeoutMs) get no explanation in the description. The enumerated modes in particular would benefit from guidance on when 'light' versus 'full' verification is appropriate, since their schema entries have no descriptions.

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?

States a specific verb and resource — 'Restart a mobile app on Android or iOS' — which is immediately actionable. It does not explicitly distinguish itself from the closely related siblings start_app and terminate_app, so the agent must infer that restart is a combined stop/start rather than one of those two.

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 an explicit numbered workflow (define expected screen, call restart_app, wait_for_*, expect_screen, retry) plus a RESOLVE → ACT → WAIT → EXPECT framing and per-failure-code handling (TIMEOUT → retry once, UNKNOWN → inspect snapshot/logs). What is missing is sibling routing: nothing tells the agent when to prefer this over terminate_app followed by start_app, or over start_app on an already-running app.

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