Docs Operation reference device operations
device operations#
17 operations. Generated from assets/operations.json; all areas.
On this page (17)
- device.list
- device.info
- device.label
- device.resolve
- device.reservation.acquire
- device.reservation.get
- device.reservation.list
- device.reservation.renew
- device.reservation.release
- device.reservation.takeover
- device.request.get
- device.request.list
- device.install
- device.app
- device.screenshot
- device.capture
- device.logs
device.list#
Find devices
Discover connected Android and iOS devices. Diagnostics distinguish missing tools from no device.
Annotations: read-only, idempotent, open world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
platform | string | "all" | one of all, android, ios |
tomaccoctl call device.list
device.info#
Device information
Read Android properties/display settings or iOS device information. For Android, health sums up the device in the same call, read-only: Android version, SDK and security patch, battery level, state, health and temperature, free and total storage on /data, screen size and density in pixels and dp, and uptime in seconds; a part the device does not report is null.
Annotations: read-only, idempotent, open world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
platform | string | yes | one of android, ios | |
device | string | yes | non-empty; Device serial / UDID from device.list |
tomaccoctl call device.info '{"platform":"android","device":"<device>"}'
device.label#
Name or pin a device
Give a device a nickname or pin it as a favourite. device.list then shows the nickname as name (the earlier name stays as original_name), marks pinned devices and lists them first; the desktop and the Omarchy panel show the same. An emulator is named by its AVD, so the name stays when its serial changes; a phone by its serial or UDID. An emulator that is off is named with device avd:NAME, its AVD name from android.avds, which also lists nickname and pinned. An empty nickname removes it and pinned false unpins. With neither, the call only reads. The result lists every label.
Annotations: writes, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
device | string | yes | non-empty; Device serial / UDID from device.list, or avd:NAME for an emulator by its AVD name | |
nickname | string | up to 40 characters; The name to show, at most 40 characters on one line; empty removes it. | ||
pinned | boolean | Pin the device as a favourite, or unpin it with false. |
tomaccoctl call device.label '{"device":"<device>"}'
device.resolve#
Find a device by name
The device a person means by name: its nickname, model name, AVD or ID, compared after folding curly apostrophes and quotes, dashes and spaces (emoji and letters stay). An exact match wins; one that ignores letter case counts next; a prefix or part of the name counts last and only when it is the only one. Two candidates at the same level answer device_ambiguous with both, never a guess, and no match answers device_not_found with the connected devices. Reads device.list, so it takes a few seconds.
Annotations: read-only, idempotent, open world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
name | string | yes | non-empty, up to 200 characters; The name as the person said it | |
platform | string | "all" | one of all, android, ios |
tomaccoctl call device.resolve '{"name":"<name>"}'
device.reservation.acquire#
Reserve a device
Reserve one device for a multi-step task for a bounded time, so the inputs of other clients (other agents, the desktop's live view) are refused with device_reserved until you release it or it expires. Answers reservation_token, the opaque capability that holds it, once: pass it to runtime.input, runtime.gesture, runtime.actions, screen.tap, android.input, testing.action and ios.emulator.control input on that device. owner, task and reason are labels others see, not authentication. The acquisition waits up to wait_ms for inputs already admitted (a tap in flight, a finger held down) to end, else device_input_in_flight; one already held answers device_reserved with its holder and expiry. Reading the screen stays possible for everyone. The guard is cooperative between Tomacco's routes for one user account: raw adb, SSH and fastboot are not governed.
Annotations: writes, not idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
device | string | yes | non-empty, up to 200 characters; The device: an Android serial, an iPhone UDID, virtual-iphone, a nickname from device.label, or a runtime session ID, which stands for the device it shows. Every name of one device reserves the same device. | |
platform | string | one of android, ios; The device's platform. Omitted, a session knows its own; otherwise a remote or a UDID means ios, anything else android. | ||
remote | string | non-empty, up to 200 characters; The remote Mac (remote.list) an iPhone is reached through; part of the device's identity. | ||
owner | string | yes | non-empty, up to 100 characters; Who holds it, as others should read it (claude-code: checkout test) | |
task | string | up to 200 characters; What it is reserved for | ||
reason | string | up to 500 characters; Why others should wait | ||
ttl_ms | integer | 60000 | 1000 to 300000; How long the reservation lasts from now, in milliseconds (1 second to 5 minutes); renew before it runs out | |
wait_ms | integer | 2000 | 0 to 30000; How long to wait for admitted inputs of others to end |
tomaccoctl call device.reservation.acquire '{"device":"<device>","owner":"<owner>"}'
device.reservation.get#
Device reservation state
Whether a device is reserved, by whom (owner, task, reason, the client and channel it reported), until when, whether inputs are in flight on it, and how its last reservation ended. With reservation_token, token says whether that token holds it (holds) or why not (expired, released, revoked, not_held). Never shows a token.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
device | string | yes | non-empty, up to 200 characters; The device: an Android serial, an iPhone UDID, virtual-iphone, a nickname from device.label, or a runtime session ID, which stands for the device it shows. Every name of one device reserves the same device. | |
platform | string | one of android, ios; The device's platform. Omitted, a session knows its own; otherwise a remote or a UDID means ios, anything else android. | ||
remote | string | non-empty, up to 200 characters; The remote Mac (remote.list) an iPhone is reached through; part of the device's identity. | ||
reservation_token | string | up to 200 characters; The reservation_token device.reservation.acquire answered. It is the capability that holds the reservation: keep it out of logs and prompts; Tomacco masks it in audit records, errors and job records. |
tomaccoctl call device.reservation.get '{"device":"<device>"}'
device.reservation.list#
Reserved devices
Every device reserved now, with its holder's labels, expiry and inputs in flight. Never shows a token.
Annotations: read-only, idempotent, closed world.
Takes no arguments.
tomaccoctl call device.reservation.list
device.reservation.renew#
Renew a device reservation
Extend your reservation to ttl_ms from now. Only a reservation that still holds can be renewed: an expired, released or taken-over one answers reservation_expired, reservation_released or reservation_revoked, and a new acquisition is needed.
Annotations: writes, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
device | string | yes | non-empty, up to 200 characters; The device: an Android serial, an iPhone UDID, virtual-iphone, a nickname from device.label, or a runtime session ID, which stands for the device it shows. Every name of one device reserves the same device. | |
platform | string | one of android, ios; The device's platform. Omitted, a session knows its own; otherwise a remote or a UDID means ios, anything else android. | ||
remote | string | non-empty, up to 200 characters; The remote Mac (remote.list) an iPhone is reached through; part of the device's identity. | ||
reservation_token | string | yes | up to 200 characters; The reservation_token device.reservation.acquire answered. It is the capability that holds the reservation: keep it out of logs and prompts; Tomacco masks it in audit records, errors and job records. | |
ttl_ms | integer | 60000 | 1000 to 300000; How long the reservation lasts from now, in milliseconds (1 second to 5 minutes); renew before it runs out |
tomaccoctl call device.reservation.renew '{"device":"<device>","reservation_token":"<reservation_token>"}'
device.reservation.release#
Release a device reservation
End your reservation now, so others may use the device. Inputs the device already received are not undone; inputs still queued under the token are refused. Releasing one that already ended answers released false with how it ended.
Annotations: writes, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
device | string | yes | non-empty, up to 200 characters; The device: an Android serial, an iPhone UDID, virtual-iphone, a nickname from device.label, or a runtime session ID, which stands for the device it shows. Every name of one device reserves the same device. | |
platform | string | one of android, ios; The device's platform. Omitted, a session knows its own; otherwise a remote or a UDID means ios, anything else android. | ||
remote | string | non-empty, up to 200 characters; The remote Mac (remote.list) an iPhone is reached through; part of the device's identity. | ||
reservation_token | string | yes | up to 200 characters; The reservation_token device.reservation.acquire answered. It is the capability that holds the reservation: keep it out of logs and prompts; Tomacco masks it in audit records, errors and job records. |
tomaccoctl call device.reservation.release '{"device":"<device>","reservation_token":"<reservation_token>"}'
device.reservation.takeover#
Take over a device reservation
For the person at the device: end another holder's reservation explicitly, with a reason its holder is shown (reservation_revoked), and with acquire true reserve the device for yourself once admitted inputs end. Nothing the device already received is undone. Agents should not call this to get around a reservation; ask the person.
Annotations: destructive, not idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
device | string | yes | non-empty, up to 200 characters; The device: an Android serial, an iPhone UDID, virtual-iphone, a nickname from device.label, or a runtime session ID, which stands for the device it shows. Every name of one device reserves the same device. | |
platform | string | one of android, ios; The device's platform. Omitted, a session knows its own; otherwise a remote or a UDID means ios, anything else android. | ||
remote | string | non-empty, up to 200 characters; The remote Mac (remote.list) an iPhone is reached through; part of the device's identity. | ||
reason | string | yes | non-empty, up to 500 characters; Why the reservation is taken over; its holder sees it | |
acquire | boolean | false | Reserve the device for the caller afterwards and answer its reservation_token | |
owner | string | up to 100 characters; The new holder's label, with acquire (person when omitted) | ||
task | string | up to 200 characters; What the new reservation is for, with acquire | ||
ttl_ms | integer | 60000 | 1000 to 300000; How long the reservation lasts from now, in milliseconds (1 second to 5 minutes); renew before it runs out | |
wait_ms | integer | 5000 | 0 to 30000; With acquire, how long to wait for admitted inputs to end |
tomaccoctl call device.reservation.takeover '{"device":"<device>","reason":"<reason>"}'
device.request.get#
Recorded request
What the request ledger knows about a request_id: its operation, canonical device, route, transport and executing instance, its state (pending, completed, unknown) and status (applied, verified, refused, failed, unknown), and its children, the inputs a runtime worker recorded for it (ID/1, ID/step-2). A request whose executing process ended before it recorded an answer is settled as unknown here, never resent. advice says what to do next; decide from a fresh observation. Records hold no typed text and are kept 24 hours.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
request_id | string | yes | non-empty, up to 169 characters; matching ^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}(/[A-Za-z0-9][A-Za-z0-9_.-]{0,39})?$; The request_id you gave, or one of its children |
tomaccoctl call device.request.get '{"request_id":"<request_id>"}'
device.request.list#
Recorded requests
The newest requests in the request ledger, optionally for one device or in one state, without their children.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
device | string | non-empty, up to 200 characters; The device: an Android serial, an iPhone UDID, virtual-iphone, a nickname from device.label, or a runtime session ID, which stands for the device it shows. Every name of one device reserves the same device. | ||
platform | string | one of android, ios; The device's platform. Omitted, a session knows its own; otherwise a remote or a UDID means ios, anything else android. | ||
remote | string | non-empty, up to 200 characters; The remote Mac (remote.list) an iPhone is reached through; part of the device's identity. | ||
state | string | one of pending, completed, unknown | ||
limit | integer | 50 | 1 to 200 |
tomaccoctl call device.request.list
device.install#
Install app
Install one or split APKs, or one .aab through bundletool (built for the selected device, then installed), or one signed IPA on the selected device.
Annotations: destructive, idempotent, open world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
platform | string | yes | one of android, ios | |
device | string | yes | non-empty; Device serial / UDID from device.list | |
paths | array of string | yes | 1 to 100 items; Absolute paths: APKs, one .aab or one .ipa |
tomaccoctl call device.install '{"platform":"android","device":"<device>","paths":["<path>"]}'
device.app#
Control app
Launch, stop, uninstall or clear application data. On an iPhone, go-ios launches, stops and uninstalls the installed app bundle_id names (xtool's XTL- prefix may be left out); without go-ios, xtool launches and uninstalls. iOS has no clear-data.
Annotations: destructive, not idempotent, open world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
platform | string | yes | one of android, ios | |
device | string | yes | non-empty; Device serial / UDID from device.list | |
bundle_id | string | yes | ||
action | string | "launch" | one of launch, stop, uninstall, clear-data | |
activity | string | "" |
tomaccoctl call device.app '{"platform":"android","device":"<device>","bundle_id":"<bundle_id>"}'
device.screenshot#
Device screenshot
Capture an actual device display to a file. On an iPhone this uses idevicescreenshot, or go-ios screenshot when idevicescreenshot is not installed; both need the developer image mounted (ios.prepare).
Annotations: writes, not idempotent, open world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
platform | string | yes | one of android, ios | |
device | string | yes | non-empty; Device serial / UDID from device.list | |
path | string | yes | non-empty; Absolute local filesystem path |
tomaccoctl call device.screenshot '{"platform":"android","device":"<device>","path":"<path>"}'
device.capture#
Device image for agents
Capture the real device display and wait up to 30 seconds. MCP returns the PNG inline, with artifact metadata.
Annotations: writes, not idempotent, open world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
platform | string | yes | one of android, ios | |
device | string | yes | non-empty; Device serial / UDID from device.list | |
path | string | yes | non-empty; Absolute local filesystem path |
tomaccoctl call device.capture '{"platform":"android","device":"<device>","path":"<path>"}'
device.logs#
Device logs
Capture bounded logcat/syslog output as a job; optionally filter by app or tag. On Android 12 and newer, bundle_id selects the app by its user ID, also across restarts and before launch; older Android needs the app running. On an iPhone, bundle_id follows the app's process, its executable as go-ios apps names it, and the job names it as process; idevicesyslog filters when it is installed, otherwise go-ios syslog runs through Tomacco's filter. filter keeps lines containing that text.
Annotations: writes, not idempotent, open world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
platform | string | yes | one of android, ios | |
device | string | yes | non-empty; Device serial / UDID from device.list | |
duration | integer | 60 | 1 to 3600 | |
filter | string | "" | ||
bundle_id | string | "" | Android application ID, or iPhone bundle id as ios.apps lists it (an xtool XTL- prefix may be left out) |
tomaccoctl call device.logs '{"platform":"android","device":"<device>"}'