Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ANDROID_SERIALNoSerial number of the Android device to target when several phones are connected. See `adb devices`.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

moreplay drives an Android phone over adb.

Work loop: observe once, then act with every step you can batch in ONE call. act waits for the screen to settle and returns it, so add no wait_idle or observe after it. Steps after the first wait for their element, so a tap into a screen that is still opening needs no wait either.

Selectors: prefer text or id; refs (@12) and coordinates are a last resort, and refs only last until the next observe. Text matches exactly first, then any label that contains it, so short or numeric text can hit the wrong element when the one you mean is not on screen yet ("1" hits "Order 1000"): use "/^1$/", or wait_for the screen it lives on first. type replaces the field's text (append: true keeps it); no need to delete characters first.

To make a task repeatable: start flow record {name, vars} BEFORE doing the task, not after exploring it, then flow save. Every successful act step is kept; remove detours afterwards with flow patch {index, steps: []} rather than doing the task twice, especially when it creates real data. Give passwords and PINs as vars and write ${name} in act, so the saved file never holds them. Right after flow save, replay it once with flow run: a replay runs faster than you act, so timing problems (a list still closing, a search result not loaded yet) only show up there. Replay with flow run (no model needed), or npx moreplay run <name> in a terminal. When a replay fails, flow patch the reported step and run again. repeat {while} and run_flow {when} check the screen at once, without waiting: wait_for the element first when it may still be loading.

Screenshots are saved as files; use show:true only when you need the pixels, and screenshot {refs} to see unlabeled icons.

Full reference: flow {action: "help", name: "steps" | "selectors" | "flows" | "cli"}. Read "selectors" before writing position (below/above/leftOf/rightOf) or nested selectors by hand, and "flows" before editing a flow file.

Only one tool can control the phone's UI at a time. If moreplay says another tool holds it, ask the user to stop that tool. While a moreplay run is replaying on the device, the tools answer "device busy": wait for the run to finish instead of retrying.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
observeA

Current screen as one line per element: @ref Class "label" #id [x,y] flags. Use refs/text/id from here in act.

actA

Run steps in order in ONE call; batch everything you can. Stops at the first failure (optional:true skips if missing). Returns the screen. Target (tap/long_press/type/wait_*): ref | x,y | text (also content-desc; exact, else contains; '/re/' = regex) | id | desc, + below/above/leftOf/rightOf/childOf/containsChild:, index:n, checked/enabled/selected/focused:bool. x,y may be '50%'. Ops: tap, long_press{ms}, type{value, field?=its label, submit?, append?} (no target = focused), scroll{dir:down|up|left|right, until?:target, max?}, swipe{x1,y1,x2,y2,ms?}, key{key:back|home|enter|recents|delete|tab|}, wait_for{target, timeout?=5000}, wait_gone{target, timeout?}, wait_idle{quietMs?=300, timeout?}, sleep{ms}, launch{package, args?:{k: v}}, stop_app{package}, clear_app{package} (wipes data), install_app{path, grant?}, uninstall_app{package}, open_link{url, package?}, permissions{package, grant?:[CAMERA..]|'all', revoke?}, logs{package?, level?=W, since?=60s, lines?=50}, apps{filter?}, screenshot{name} (name or path; saved, not shown), observe, hide_keyboard, repeat{times? | while?:{visible|notVisible: target}, steps}, run_flow{file? | steps?, vars?, when?:{visible|notVisible: target | true: '${!!X}'}}: subflow (file relative to the flow), skipped if when fails.

screenshotB

Save a JPEG of the screen and return its path. show=true to see it too.

flowA

Record once, replay without a model. name: flow name or .yaml path. record{name, vars?}: keep every successful act step (refs become stable selectors); ${var} in act takes vars, saved unexpanded. save / discard: end it. run{name, vars?, evidence?=dir}: replay; steps wait for their element. On failure: step number + screen; fix with patch{name, index, steps} (steps:[] deletes), run again. list, show{name}, help{name?:steps|selectors|flows|cli}: full reference.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation4/5

The four tools map to distinct phases: observe reads the screen into refs, act performs interactions, screenshot persists an image, flow manages record/replay. The only mild overlap is observe vs screenshot (both surface screen state), but the descriptions clearly separate structured refs/text from a saved JPEG path.

Naming Consistency4/5

All names are single lowercase words with no casing or style drift, which is predictable. There is a small grammatical inconsistency (observe/act are verbs, screenshot/flow are nouns) but the intent remains immediately readable.

Tool Count4/5

Four tools for a mobile-automation agent is compact and each earns its place; nothing is redundant. The tradeoff is that act is a mega-tool aggregating ~30 operations (tap, scroll, launch, install, permissions, logs, repeat, run_flow), so the surface is thinner at the top level than the underlying capability set suggests.

Completeness4/5

Coverage is strong for the domain: screen reading, full input/interaction set, app lifecycle (launch/stop/clear/install/uninstall), permissions, logs, waits, plus flow record/replay/patch for determinism. Minor gaps remain around clipboard/file transfer, explicit assertions or text extraction helpers, and deeper view-hierarchy introspection.

Maintenance

ActivityNo data
ResponsivenessOutdated data