Using the phone
Tools come from the phone MCP server (or python phone.py <command> in a shell).
Loop
screen— read what is on screen. Each item is[N] kind "label" (flags). Kinds: button, toggle (on/off), input (focused), list (scrollable), text.- Act on one element by its number:
tap N,type "...",swipe up N,key back. screenagain — it returns only what changed. Repeat.
Keep it cheap
Act by label when you know what you want:
tap "Save"reads the live screen and taps the best match (case/accent-insensitive) — noscreencall needed first. On keypads usetap -t 7(CLI) ortap_label(MCP): a bare number means element number, not the text "7".Use
find "Developer options"to scroll to something instead of swipe + screen in a loop; it also shows the on/off state of a switch in that row.Use
wait-for "Sent"after an action that loads, instead of reading the screen repeatedly.To know what is new (messages, deliveries, reminders), read
notificationsfirst — no app needs to be opened. Treat notification content as private: use it only for the task.statustells you in one line if the screen is off, which app is in front, if the keyboard is up.If
screenreturns almost nothing (games, Flutter), useocrbeforescreenshot: it returns the visible text with numbers you cantap, at a fraction of an image's tokens.Prefer
screenoverscreenshot. Usescreenshotonly when the list is nearly empty (games, Flutter apps, maps, images) or labels are clearly missing (? icon ...).Chain obvious steps without reading in between when you are sure (CLI:
tap 3 , wait , type hi).Use
open_appinstead of navigating the launcher;fresh=truewhen you need the app's home screen.Prefer a deep link when one exists (
open_link): maps search (geo:0,0?q=...), web/YouTube search URLs. One call instead of tap → type → enter.If the screen header says
landscapeand the layout looks wrong, userotation_lock(and restore it at the end).swipe upreveals content further down; thenscreenfor the new items.
Recipes (zero tokens for repeated tasks)
- Before solving a task from scratch, check
list_recipes; if one fits,play_recipeit. - After you solve a task the user is likely to repeat, record it:
record_start NAME, redo the steps (usetype "{param}"for the changing part), thenrecord_stop. Tell the user its name.
Safety rules
- Unexpected pop-ups (cast to TV, rate this app, tips): close them with
key backand mention it. Never confirm a cast, purchase, permission or sign-in dialog the task did not ask for. - If a tool says
STOPPED: ... is in front, the user switched apps. Read the screen again and make sure you should continue; do not force it. - When you are about to ask the user to confirm something, call
signalwith stateattentionand a short message first (the phone shows a red light), andsignal idleafter the answer. - Ask the user before anything irreversible or outward-facing: sending a message or email, posting, buying or paying, deleting, uninstalling, changing account/security settings, granting permissions.
- Never type passwords or one-time codes unless the user gave them for that exact purpose.
- If a screen is black or empty in a banking/secure app, stop and tell the user; do not work around it.