You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`device_tap_element`| Find an element by label/identifier/text/type and tap its center. |
120
+
|`device_tap_coordinates`| Tap at exact screen coordinates. Last resort when queries fail. |
121
+
|`device_type`| Type text into the currently focused input field. |
122
+
|`device_swipe`| Swipe in a direction with optional start coordinates and distance. |
123
+
|`device_long_press`| Long press an element for context menus or drag initiation. |
124
+
|`device_wait_for`| Poll until an element matching a query appears. |
125
+
|`device_press_button`| Press a device button (home/back/enter/lock). |
123
126
124
127
### App & Device Control
125
128
@@ -132,28 +135,31 @@ The `.device-session` file is typically written by the test runner when it creat
132
135
133
136
### Element Identification
134
137
135
-
Elements are identified by accessibility attributes — not internal refs:
138
+
Elements are identified by accessibility attributes — not internal refs. Matching is **fuzzy**: partial text and case-insensitive matches work. For example, querying `{ label: "Confirm" }` matches an element with label `"Confirm Transaction"`.
Copy file name to clipboardExpand all lines: SKILL.md
+48-2Lines changed: 48 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# @metamask/device-mcp — Agent Reference
2
2
3
-
You interact with a mobile device (iOS simulator or Android emulator) through the `device-mcp` MCP server. It exposes 6 tools for inspecting and controlling the device UI.
3
+
You interact with a mobile device (iOS simulator, Android emulator, or BrowserStack remote device) through the `device-mcp` MCP server. It exposes 16 tools for inspecting UI state, interacting with elements, capturing evidence, and controlling app lifecycle.
4
4
5
5
## When to Use This
6
6
@@ -23,6 +23,9 @@ device_snapshot # 3. See the result — NEVER assume screen state
23
23
-**ALWAYS call `device_snapshot` before interacting.** You cannot guess what's on screen.
24
24
-**NEVER call `device_snapshot` twice without acting in between.** If the screen hasn't changed, the hierarchy won't either.
25
25
-**ALWAYS call `device_snapshot` after interacting.** Confirm the action had the expected effect.
26
+
-**Call `device_dismiss_keyboard` after typing.** The keyboard obscures elements below the input.
27
+
-**Call `device_dismiss_alert` when a system dialog appears.** Permission prompts block all other interaction.
28
+
-**Use `device_screenshot` for visual evidence.** Snapshots show accessibility data; screenshots show what the user sees.
26
29
27
30
## Tools
28
31
@@ -56,6 +59,8 @@ Find an element by query and tap its center. Specify at least one of: `label`, `
56
59
3.`text` — visible text content (matches both `value` and `label`)
57
60
4.`type` — element class (least specific, combine with other fields)
58
61
62
+
**Matching is fuzzy:** partial text and case-insensitive matches work. `{ label: "Confirm" }` matches `"Confirm Transaction"`.
63
+
59
64
**Examples:**
60
65
61
66
```json
@@ -64,6 +69,22 @@ Find an element by query and tap its center. Specify at least one of: `label`, `
64
69
{ "text": "Send", "type": "Button" }
65
70
```
66
71
72
+
### device_tap_coordinates
73
+
74
+
Tap at exact screen coordinates. Use as a **last resort** when element queries fail. Get coordinates from `device_snapshot` frame data.
75
+
76
+
```json
77
+
{ "x": 195, "y": 722 }
78
+
```
79
+
80
+
### device_long_press
81
+
82
+
Long press an element. Used for context menus, drag initiation, and other long-press interactions.
83
+
84
+
```json
85
+
{ "label": "Transaction", "durationMs": 2000 }
86
+
```
87
+
67
88
### device_type
68
89
69
90
Type text into the currently focused input. **Tap an input field first** to focus it, then call this.
@@ -104,6 +125,12 @@ Check if an app is running, installed, or absent.
104
125
{ "bundleId": "io.metamask" }
105
126
```
106
127
128
+
### device_info (read-only)
129
+
130
+
Get device platform, name, OS version, and device ID.
131
+
132
+
**When:** Understanding which device/platform you're connected to. Including platform-specific instructions in your workflow.
133
+
107
134
### device_screenshot (read-only)
108
135
109
136
Capture a screenshot of the current screen. Returns base64 PNG image data.
@@ -192,8 +219,10 @@ device_snapshot # verify we're there
192
219
device_snapshot # see available inputs
193
220
device_tap_element { "identifier": "email-input" } # focus the field
194
221
device_type { "text": "user@example.com" } # type into it
222
+
device_dismiss_keyboard # hide keyboard
195
223
device_tap_element { "identifier": "password-input" } # focus next field
196
224
device_type { "text": "secret123" } # type password
0 commit comments