Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/device-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A session is named by its `id` (for example `brave-teal-otter`) in every path. E
| `POST /device/sessions/:id/actions` | One action: `tap` (`x`/`y` percent, `text` or `id`), `type` (`text`, and `sensitive: true` to keep it secret), `swipe` (`direction`: `up`, `down`, `left` or `right`, or `from`/`to` points in percent), `press_key` (`key`: `back`, `home`, `enter`, `backspace`, `tab`, `volume_up`, `volume_down`, `lock` or `power`) |
| `POST /device/sessions/:id/run` | Run Maestro: `{ "yaml": "..." }` for one flow, or `{ "flowUploadId": "...", "flow"?: "..." }` for a [flow bundle](#flow-bundles). `env` passes [secrets and variables](#secrets). Waits up to 110 s, or `waitSeconds` (0 to 300), then answers `running` with a `command_id`. A failed run's result includes `screen_text`, the app's visible text after the failure |
| `GET /device/sessions/:id/commands/:commandId` | The status and result of a `run` that answered `running`. `?waitSeconds=` (0 to 300) waits for it to finish instead of answering at once |
| `GET /device/sessions/:id/inspect` | The screen as compact JSON. The on-screen keyboard and the System UI are left out unless you add `?all=true` |
| `GET /device/sessions/:id/inspect` | The screen as compact JSON. The on-screen keyboard and the System UI are left out unless you add `?all=true`. Some apps also drop their own fields from the tree while a keyboard is open, and `all` cannot bring them back: hide the keyboard first (`run` with `- hideKeyboard`), then inspect again |
| `GET /device/sessions/:id/screenshot` | The screen as it is now, as a JPEG data URL. `fresh` is `false` when no new frame came within 3 s, so this is the latest there is |
| `GET /device/sessions/:id/logs` | The installed app's recent device log lines. `lines` (default 200, at most 2000), `level` (`warning` or `error`) and `grep` (any case) narrow them. The answer stops at 24 KB, with `truncated: true` when older lines were left out |

Expand Down
2 changes: 2 additions & 0 deletions cli/dcd-device.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Launch an app: the installed one, or a bundle id or package name. `--clear-state

The screen as compact JSON: each element with its text, id, accessibility label or hint, any state (checked, selected, focused or disabled), and its bounds. Use these to target `tapOn` in a flow. The on-screen keyboard's keys and the System UI (the status and navigation bars) are left out; `--all` lists them too.

While a keyboard is open, some apps report their own fields and buttons with clipped accessibility bounds, so they are missing from `inspect` even with `--all`, while the screenshot still shows them. Seen with React Native apps on Android that slide an input bar up above the keyboard. Hide the keyboard first, with a flow that runs `- hideKeyboard`, then inspect again. Typing does not need the keyboard on screen.

## `dcd device screenshot [id]`

Save a screenshot. `-o <file>` sets where (default `./<session>-<time>.jpg`). With `--json`, `data` gives the file's path.
Expand Down
4 changes: 2 additions & 2 deletions mcp/agent-devices-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use the DeviceCloud MCP tools to check app changes on a real iOS simulator or An
1. Call `cheat_sheet` once for Maestro syntax.
2. `start_device` with the platform (`list_devices` shows the models). Give the user the session's `monitor_url`, where they can watch. A queued session is normal: it starts on its own. Until it is ready, call `get_device_status` with `wait: true`.
3. `install_app`, then `get_device_status` with `wait: true` until the install is done, then `launch_app`.
4. Loop: `inspect_screen` to see what is on screen, then `run` with Maestro commands to act, then `inspect_screen` again. Target elements by their text or id from `inspect_screen`, not by coordinates. Use `take_screenshot` when the layout matters.
4. Loop: `inspect_screen` to see what is on screen, then `run` with Maestro commands to act, then `inspect_screen` again. Target elements by their text or id from `inspect_screen`, not by coordinates. Use `take_screenshot` when the layout matters. If the app's own fields are missing from `inspect_screen` while a keyboard is open, hide it (`run` with `- hideKeyboard`) and inspect again.
5. If a step needs a person (a 2FA code, a CAPTCHA, a payment sheet), call `request_human` with what they should do, tell the user, and poll `get_human_status` until it is handed back.
6. Always `stop_device` when you are done, even after a failure. A session bills by the minute.

Expand All @@ -37,7 +37,7 @@ description: Check app changes on a real cloud iOS simulator or Android emulator
1. Call `cheat_sheet` once for Maestro syntax.
2. `start_device` with the platform, and give the user the session's `monitor_url`. A queued session starts on its own: call `get_device_status` with `wait: true` until it is ready.
3. `install_app` (with `app_path` for a local build when using `dcd mcp`), wait with `get_device_status` until it is installed, then `launch_app`.
4. Loop: `inspect_screen`, then `run` with Maestro commands, then `inspect_screen` again. Target elements by text or id, not coordinates.
4. Loop: `inspect_screen`, then `run` with Maestro commands, then `inspect_screen` again. Target elements by text or id, not coordinates. If the app's fields are missing while a keyboard is open, hide it (`- hideKeyboard`) and inspect again.
5. If a person is needed (2FA, CAPTCHA, payment), call `request_human`, tell the user, and poll `get_human_status` until it is handed back.
6. Always `stop_device` when done, even after a failure.

Expand Down
2 changes: 2 additions & 0 deletions mcp/agent-devices-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ Launch an app on the device: the installed build by default, or any app by id (e

The current screen as compact JSON: every element of the app with text, an id, a label or a hint, with its bounds and any state (checked, selected, focused, enabled: false). Use it before tapping, and copy txt and rid values exactly into run commands (tapOn text / id). Shows the result of your last command. The on-screen keyboard's keys and the System UI (status bar, navigation bar) are left out and counted in `hidden`; keyboard_open says a keyboard is showing.

While a keyboard is open, some apps report their own fields and buttons with clipped accessibility bounds, and those elements are then missing from inspect_screen even with `all`, while the screenshot still shows them. Seen with React Native apps on Android that slide an input bar up above the keyboard. Hide the keyboard first, with `run` and `- hideKeyboard`, then inspect_screen again. Typing does not need the keyboard on screen: `inputText` goes to the focused field.

Read-only.

| Input | Type | Required | Description |
Expand Down
5 changes: 3 additions & 2 deletions public/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1956,8 +1956,9 @@ paths:
description: >-
The screen as a flat list of elements with text, an id, a label or a hint, using Maestro's short key
names. It waits up to 5 s for a screen read taken after your last command. On Android, the on-screen
keyboard and the System UI are left out and counted in `hidden`, unless `all` is set. This session's
secret values are masked.
keyboard and the System UI are left out and counted in `hidden`, unless `all` is set. Some apps drop
their own fields from the tree while a keyboard is open, and `all` cannot bring them back: hide the
keyboard first, then inspect again. This session's secret values are masked.
parameters:
- name: all
in: query
Expand Down
Loading