Skip to main content
Glama

phone_reconnect

Restart on-device automation for the configured phone when it is released or offline and a user-requested operation cannot proceed. Call once with wait_secs to block until the phone is drivable or blocked.

Instructions

Start/restart on-device automation for the configured phone. This occupies the phone and may require the operator to unlock it. Use only to continue a current user-requested phone operation or screen/UI read that cannot proceed; never reconnect for initialization, status/health checks, a completed task, or to keep the phone ready. Idle release is intentional. Require phone_status released/offline and recovery_owner=daemon; inspect hint/setup_blocked_on first. Do not reconnect while releasing/reconnecting or a blocker remains. Once these conditions are met, call once, then wait for the outcome: pass wait_secs (e.g. 180) to block until drivable=true, a blocker (setup_blocked_on), or the timeout, instead of polling phone_status; wait.outcome is drivable, blocked, stopped or timeout. While it is reconnecting, report setup_phase/setup_message and obey setup_blocked_on. This tool never accepts a UDID and cannot switch devices. An externally managed runner returns an operator-owned recovery error.

Input Schema

NameRequiredDescriptionDefault
instanceNoInstalled local instance name, such as i13 or default. Omit to use the configured daemon. No fallback on failure.
wait_secsNoWait up to this many seconds (1–300) for the outcome instead of returning at once: the call returns when the phone is drivable, a blocker appears (setup_blocked_on, e.g. the passcode), or the time is up — with the compact final state (a blocker other than the passcode must hold for 20 s first). A runner rebuild after an upgrade takes 1–2 min, so 180 covers it. Omit to return immediately.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.27.34
    • addedInput schema / properties / wait_secs / minimum
      Added value: +0
  2. Changed4 schema fields changedv0.27.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / description
      Added value: +"Parameters for [`PhoneHandler::phone_reconnect`]."
    • addedInput schema / properties / instance
      Added value: +{
      +  "description": "Installed local instance name, such as i13 or default. Omit to use the configured daemon. No fallback on failure.",
      +  "type": "string"
      +}
    • addedInput schema / properties / wait_secs
      Added value: +{
      +  "default": null,
      +  "description": "Wait up to this many seconds (1–300) for the outcome instead of\nreturning at once: the call returns when the phone is drivable, a\nblocker appears (setup_blocked_on, e.g. the passcode), or the time is\nup — with the compact final state (a blocker other than the passcode\nmust hold for 20 s first). A runner rebuild after an upgrade\ntakes 1–2 min, so 180 covers it. Omit to return immediately.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  3. First observedv0.21.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only say readOnly=false, idempotent=false, openWorld=true, destructive=false; the description adds substantial context beyond that — the phone is occupied, an operator may need to unlock it, idle release is intentional, reconnecting has observable setup_phase/setup_message, and an externally managed runner yields an operator-owned recovery error. It stops just short of describing failure messages in full, but the coverage is well above the annotation bar.

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?

Front-loaded with purpose, then preconditions, then the call-once-and-wait protocol, so an agent can act on the first sentences. It is dense and slightly repetitive ('Idle release is intentional' plus the repeated blocker/releasing prohibitions), but nearly every clause encodes a distinct rule.

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?

There is no output schema, and the description compensates by naming wait.outcome states and the blocking conditions under which the call returns. For a state-mutating, operator-dependent tool, setup/recovery/error behavior is all covered.

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 100%, so the baseline is 3; the description still adds value by recommending wait_secs=180 with a rationale (runner rebuild after upgrade takes 1–2 min), and by naming the wait.outcome values (drivable, blocked, stopped, timeout) that the schema does not enumerate. The instance parameter is left entirely to 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?

States a specific verb and resource — 'Start/restart on-device automation for the configured phone' — and immediately bounds scope with 'This tool never accepts a UDID and cannot switch devices,' which separates it from device-selection or multi-device siblings like phone_instances.

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?

Explicitly enumerates when NOT to use it (initialization, status/health checks, completed task, keeping the phone ready) and names the alternative implicitly (phone_status for status). It also gives hard preconditions: phone_status must be released/offline, recovery_owner=daemon, inspect hint/setup_blocked_on first, and no reconnect while releasing or blocked.

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