android-agent-bridge 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +228 -119
- package/apk/agent-bridge.apk +0 -0
- package/package.json +1 -1
- package/server/mcp.mjs +2 -0
- package/server/prompts.mjs +68 -0
package/README.md
CHANGED
|
@@ -1,119 +1,228 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/Rudrasamadhiya/android-agent-bridge/main/docs/icon.svg" width="96" alt="Agent Bridge icon" />
|
|
4
|
+
|
|
5
|
+
# Agent Bridge
|
|
6
|
+
|
|
7
|
+
**Give your AI agent a real Android phone.**
|
|
8
|
+
|
|
9
|
+
Claude Code, Cursor, Antigravity or any MCP agent can see your phone's screen, tap, type, open apps, change settings and move files.<br/>
|
|
10
|
+
One `npx` command on the computer, one QR scan on the phone.
|
|
11
|
+
|
|
12
|
+
[](https://www.npmjs.com/package/android-agent-bridge)
|
|
13
|
+
[](https://www.npmjs.com/package/android-agent-bridge)
|
|
14
|
+
[](https://github.com/Rudrasamadhiya/android-agent-bridge/releases)
|
|
15
|
+
[](#works-on)
|
|
16
|
+
[](#for-agents)
|
|
17
|
+
[](LICENSE)
|
|
18
|
+
|
|
19
|
+
[**Website**](https://rudrasamadhiya.github.io/android-agent-bridge/) · [**Get started**](https://rudrasamadhiya.github.io/android-agent-bridge/start/) · [**Docs**](https://rudrasamadhiya.github.io/android-agent-bridge/docs/) · [**Download the app**](https://github.com/Rudrasamadhiya/android-agent-bridge/releases/latest/download/agent-bridge.apk)
|
|
20
|
+
|
|
21
|
+
<br/>
|
|
22
|
+
|
|
23
|
+
<img src="https://raw.githubusercontent.com/Rudrasamadhiya/android-agent-bridge/main/docs/screens/app-connect.webp" width="230" alt="Connect tab" />
|
|
24
|
+
<img src="https://raw.githubusercontent.com/Rudrasamadhiya/android-agent-bridge/main/docs/screens/uber-choose-trip.webp" width="230" alt="An agent choosing a ride in Uber" />
|
|
25
|
+
<img src="https://raw.githubusercontent.com/Rudrasamadhiya/android-agent-bridge/main/docs/screens/app-transfer.webp" width="230" alt="Transfer tab" />
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<br/>
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
┌──────────────┐ MCP / CLI ┌─────────────────────┐ Wi-Fi or USB ┌──────────────────┐
|
|
33
|
+
│ Claude Code, │ ────────────▶ │ android-agent-bridge │ ◀──────────────▶ │ Agent Bridge app │
|
|
34
|
+
│ Cursor, … │ │ (your computer) │ │ (your phone) │
|
|
35
|
+
└──────────────┘ └─────────────────────┘ └──────────────────┘
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Quick start
|
|
39
|
+
|
|
40
|
+
> You need an Android phone (5.0+), Node.js 20+ and, the first time only, a USB cable.
|
|
41
|
+
|
|
42
|
+
**1. Install the app and pair, over USB.** Turn on *USB debugging* (Settings → About phone → tap *Build number* 7 times → Developer options), plug in, then:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx android-agent-bridge usb
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
It installs the app, switches on its accessibility service, pairs and starts the bridge.
|
|
49
|
+
|
|
50
|
+
**2. Connect your agent.** For Claude Code:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
claude mcp add phone -- npx -y android-agent-bridge
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**3. Ask it something.**
|
|
57
|
+
|
|
58
|
+
> *"Open YouTube on my phone and search for lofi music."*
|
|
59
|
+
|
|
60
|
+
That's it. From now on the phone also works over Wi-Fi: run `npx android-agent-bridge start` and it reconnects by itself.
|
|
61
|
+
|
|
62
|
+
<details>
|
|
63
|
+
<summary><b>Prefer Wi-Fi and a QR code?</b></summary>
|
|
64
|
+
|
|
65
|
+
<br/>
|
|
66
|
+
|
|
67
|
+
[Download the APK](https://github.com/Rudrasamadhiya/android-agent-bridge/releases/latest/download/agent-bridge.apk) and install it on the phone, then:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx android-agent-bridge start
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
In the app: **Scan QR code** → point it at the code in your terminal (or the bigger one at `localhost:8350/pair`) → turn on the **accessibility service**. Phone and computer must be on the same Wi-Fi.
|
|
74
|
+
|
|
75
|
+
If Play Protect says *"App blocked to protect your device"*, install over USB with `usb` instead. Installs over USB aren't blocked.
|
|
76
|
+
|
|
77
|
+
</details>
|
|
78
|
+
|
|
79
|
+
<details>
|
|
80
|
+
<summary><b>Cursor, Antigravity, Windsurf and other MCP clients</b></summary>
|
|
81
|
+
|
|
82
|
+
<br/>
|
|
83
|
+
|
|
84
|
+
Run `npx android-agent-bridge init` in your project (it writes `.mcp.json`, plus `.cursor/mcp.json` with `--cursor`), or add this to your client's MCP config:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"phone": { "command": "npx", "args": ["-y", "android-agent-bridge"] }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
</details>
|
|
95
|
+
|
|
96
|
+
## What it can do
|
|
97
|
+
|
|
98
|
+
| | |
|
|
99
|
+
|---|---|
|
|
100
|
+
| 👁 **Sees the screen** | A numbered list of every button and field, and screenshots with each element boxed. Knows what's hidden under sheets and dialogs. |
|
|
101
|
+
| 🔤 **Reads what apps hide** | On-device OCR reads the pixels when an app hides its controls from accessibility, so "tap Account" still works. Nothing leaves the phone. |
|
|
102
|
+
| 👆 **Acts like a person** | Tap by number, text or position. Type into fields, scroll, swipe, long-press, Back and Home. Open any app by name. |
|
|
103
|
+
| 🎛 **Runs the device** | Volume, brightness, flashlight, rotation, Do Not Disturb, settings pages, links, dialer, battery, notifications, clipboard. |
|
|
104
|
+
| 📁 **AirDrop, both ways** | `phonectl send photo.jpg`, drag files onto `localhost:8350/drop`, or Share → Agent Bridge on the phone. Any size, no cloud. |
|
|
105
|
+
| 📱 **Old phones welcome** | Android 5.0 (2015) and up. Where old Android can't do something, the computer does it over USB. |
|
|
106
|
+
|
|
107
|
+
## Try these prompts
|
|
108
|
+
|
|
109
|
+
Once the phone is connected, paste any of these into your agent:
|
|
110
|
+
|
|
111
|
+
- *"Is my phone connected? Take a screenshot and tell me what's on screen."*
|
|
112
|
+
- *"Read my phone's notifications and summarise them by app. Don't reply to anything."*
|
|
113
|
+
- *"Turn media volume to 30%, brightness to 60 and switch on Do Not Disturb."*
|
|
114
|
+
- *"Open my app (com.example.app) and test the sign-up flow like a QA tester. Give me a bug list."*
|
|
115
|
+
- *"Send ./report.pdf to my phone and tell me where it was saved."*
|
|
116
|
+
|
|
117
|
+
More in the [prompt library](https://rudrasamadhiya.github.io/android-agent-bridge/start/#prompts). Agents are told to ask before sending, posting, paying or deleting, and never to type passwords.
|
|
118
|
+
|
|
119
|
+
## For agents
|
|
120
|
+
|
|
121
|
+
The MCP server gives your agent **27 tools** and **6 ready-made prompts**. In Claude Code the prompts are slash commands:
|
|
122
|
+
|
|
123
|
+
| Slash command | What it does |
|
|
124
|
+
|---|---|
|
|
125
|
+
| `/mcp__phone__phone_tour` | Checks the phone is connected and describes the screen |
|
|
126
|
+
| `/mcp__phone__do_in_app` | Opens an app and carries out a task step by step |
|
|
127
|
+
| `/mcp__phone__test_my_app` | QA walkthrough of an app, with a bug report |
|
|
128
|
+
| `/mcp__phone__catch_up` | Summarises notifications, urgent first |
|
|
129
|
+
| `/mcp__phone__set_up_phone` | Volume, brightness, Do Not Disturb in one go |
|
|
130
|
+
| `/mcp__phone__send_to_phone` | Sends files and confirms where they landed |
|
|
131
|
+
|
|
132
|
+
<details>
|
|
133
|
+
<summary><b>All 27 tools</b></summary>
|
|
134
|
+
|
|
135
|
+
<br/>
|
|
136
|
+
|
|
137
|
+
| MCP tool | CLI | What it does |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| `phone_status` | `status` | Connected phone, Android version, capabilities |
|
|
140
|
+
| `phone_screen` | `screen [--mode marks\|grid\|both\|plain]` | Screenshot with numbered elements or a lettered grid |
|
|
141
|
+
| `phone_elements` | `elements [--all] [--ocr]` | Element list only (cheap text) |
|
|
142
|
+
| `phone_ocr` | `ocr` | Text read from the screen pixels, with positions |
|
|
143
|
+
| `phone_tap` | `tap <target> [--long]` | Tap or long-press |
|
|
144
|
+
| `phone_type` | `type <text> [--into t] [--submit]` | Type into a field |
|
|
145
|
+
| `phone_scroll` | `scroll <dir> [--in t]` | Scroll the screen or a list |
|
|
146
|
+
| `phone_swipe` | `swipe <from> <to>` | Drag between two points |
|
|
147
|
+
| `phone_key` | `key <name>` | back, home, recents, notifications, quick_settings, enter, lock |
|
|
148
|
+
| `phone_open_app` | `launch <app> [--store]` | Open an app by name, or its Play Store page |
|
|
149
|
+
| `phone_apps` | `apps [filter]` | Installed apps |
|
|
150
|
+
| `phone_wait_for` | `wait <text>` | Wait for text to appear |
|
|
151
|
+
| `phone_volume` | `volume [stream] [level]` | Media, ring, notification, alarm, call volume |
|
|
152
|
+
| `phone_brightness` | `brightness [0-100\|auto]` | Screen brightness |
|
|
153
|
+
| `phone_toggle` | `flashlight` · `rotation` · `dnd` · `ringer` | Quick switches |
|
|
154
|
+
| `phone_settings` | `settings <page>` | Wi-Fi, Bluetooth, display, battery… or an app's info page |
|
|
155
|
+
| `phone_open_link` | `url <link>` | Web pages and deep links |
|
|
156
|
+
| `phone_dial` | `dial <number>` | Dialer with the number filled in (never calls) |
|
|
157
|
+
| `phone_web_search` | `search <query>` | Web search on the phone |
|
|
158
|
+
| `phone_device_info` | `battery` · `current` | Battery, app in front |
|
|
159
|
+
| `phone_notifications` | `notifications` | Notifications since the service started |
|
|
160
|
+
| `phone_clipboard` | `clipboard [set <text>]` | Read or set the clipboard |
|
|
161
|
+
| `phone_wake` | `wake` | Turn the screen on (stays PIN-locked) |
|
|
162
|
+
| `phone_permissions` | `permissions [grant]` | Optional permissions, switched on over USB |
|
|
163
|
+
| `phone_send_files` | `send <files…>` | Computer → phone |
|
|
164
|
+
| `phone_received_files` | `received` | Files the phone sent to the computer |
|
|
165
|
+
| `phone_stop_app` | `stop <package>` | Force-stop an app (USB) |
|
|
166
|
+
|
|
167
|
+
A **target** is an element number (`12`), visible text (`Sign in`), a grid cell (`C7`) or pixels (`540,1200`).
|
|
168
|
+
|
|
169
|
+
</details>
|
|
170
|
+
|
|
171
|
+
## From the terminal
|
|
172
|
+
|
|
173
|
+
Everything an agent can do, you can do too. `npm i -g android-agent-bridge` gives you the `phonectl` command; keep `start` running in another terminal.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
phonectl status # is the phone connected?
|
|
177
|
+
phonectl launch YouTube # open an app
|
|
178
|
+
phonectl screen --out shot.jpg # screenshot with numbered elements
|
|
179
|
+
phonectl tap "Search" # tap by text, number, grid cell or pixels
|
|
180
|
+
phonectl type "lofi music" --submit # type and press Enter
|
|
181
|
+
phonectl volume 40% # media volume
|
|
182
|
+
phonectl send report.pdf # send a file to the phone
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Full reference: [Docs → Commands](https://rudrasamadhiya.github.io/android-agent-bridge/docs/#commands).
|
|
186
|
+
|
|
187
|
+
## Works on
|
|
188
|
+
|
|
189
|
+
| | Android 5–6 | Android 7–10 | Android 11+ |
|
|
190
|
+
|---|---|---|---|
|
|
191
|
+
| Read the screen, type, tap elements, Back/Home | ✅ | ✅ | ✅ |
|
|
192
|
+
| Tap anywhere (grid, pixels), swipes | over USB | ✅ | ✅ |
|
|
193
|
+
| Screenshots | one-time prompt, or USB | one-time prompt, or USB | ✅ built in |
|
|
194
|
+
|
|
195
|
+
Apps that block screen capture (banking, streaming) show up black in screenshots; their element list usually still works. iPhone isn't supported: iOS has no equivalent of Android's accessibility service for apps.
|
|
196
|
+
|
|
197
|
+
## Security
|
|
198
|
+
|
|
199
|
+
- **Paired, not public.** Only a computer holding the secret from your QR code can connect. `npx android-agent-bridge pair --reset` makes a new one.
|
|
200
|
+
- **Stays on your network.** Wi-Fi or USB straight to your computer. No cloud, no account, no analytics. Wi-Fi traffic isn't encrypted, so use networks you trust; over USB it never leaves the cable.
|
|
201
|
+
- **One switch to stop.** Turn off the accessibility service and access ends at once.
|
|
202
|
+
- **Agents ask first.** The bundled guide tells agents to ask before sending, paying, posting or deleting, and never to type passwords.
|
|
203
|
+
|
|
204
|
+
<details>
|
|
205
|
+
<summary><b>Troubleshooting</b></summary>
|
|
206
|
+
|
|
207
|
+
<br/>
|
|
208
|
+
|
|
209
|
+
- **"App blocked to protect your device":** install over USB with `npx android-agent-bridge usb`.
|
|
210
|
+
- **No phone connected:** is `start` running? Same Wi-Fi? On Windows, allow Node.js through the firewall. Over USB, run `usb` again.
|
|
211
|
+
- **Accessibility switch greyed out** (Android 13+): App info → ⋮ → Allow restricted settings.
|
|
212
|
+
- **A tap opened nothing right after Home:** Android holds app starts for about 5 seconds after Home; run it again.
|
|
213
|
+
|
|
214
|
+
</details>
|
|
215
|
+
|
|
216
|
+
## Build from source
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
git clone https://github.com/Rudrasamadhiya/android-agent-bridge
|
|
220
|
+
cd android-agent-bridge && npm install
|
|
221
|
+
cd android && ./gradlew assembleRelease # JDK 17 + Android SDK
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Copy `android/app/build/outputs/apk/release/app-release.apk` to `apk/agent-bridge.apk`. The website lives in `website/` (Next.js); `npm run build` there publishes it to `docs/`.
|
|
225
|
+
|
|
226
|
+
## License
|
|
227
|
+
|
|
228
|
+
[MIT](LICENSE) · Made by [Rudra Samadhiya](https://github.com/Rudrasamadhiya)
|
package/apk/agent-bridge.apk
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "android-agent-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Give AI agents (Claude Code, Cursor, Antigravity) your whole Android phone: screenshots with numbered elements and a tap grid, tap, type, scroll, open apps. Pair once by QR over Wi-Fi or plug in USB. Android 5.0+.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"android",
|
package/server/mcp.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { createRequire } from 'node:module';
|
|
8
8
|
import { Bridge } from './bridge.mjs';
|
|
9
|
+
import { registerPrompts } from './prompts.mjs';
|
|
9
10
|
|
|
10
11
|
const { version: VERSION } = createRequire(import.meta.url)('../package.json');
|
|
11
12
|
const log = (...a) => process.stderr.write('[android-agent-bridge] ' + a.join(' ') + '\n');
|
|
@@ -226,6 +227,7 @@ export async function startServer() {
|
|
|
226
227
|
const bridge = new Bridge({ log, host: true });
|
|
227
228
|
const server = new McpServer({ name: 'android-agent-bridge', version: VERSION });
|
|
228
229
|
registerTools(server, bridge);
|
|
230
|
+
registerPrompts(server);
|
|
229
231
|
await server.connect(new StdioServerTransport());
|
|
230
232
|
bridge.ensure().then(async () => {
|
|
231
233
|
if (bridge.hub) {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Ready-made prompts the MCP server offers. Clients show them as one-click starters
|
|
2
|
+
// (Claude Code: /mcp__phone__<name>). Each one sets the agent up to work safely.
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
const SAFETY = 'Before sending a message, posting, paying, deleting or changing account settings, stop and ask me. Never type passwords or card numbers; ask me to do that on the phone.';
|
|
6
|
+
|
|
7
|
+
const msg = (text) => ({ messages: [{ role: 'user', content: { type: 'text', text } }] });
|
|
8
|
+
|
|
9
|
+
export const PROMPTS = [
|
|
10
|
+
{
|
|
11
|
+
name: 'phone_tour',
|
|
12
|
+
title: 'Check the phone',
|
|
13
|
+
description: 'Confirm the phone is connected and describe what is on screen right now.',
|
|
14
|
+
args: {},
|
|
15
|
+
text: () => `Use the phone tools. Call phone_status to check my Android phone is connected (if it isn't, tell me how to pair it). Then take a phone_screen and tell me in two or three sentences which app is open and what I could do from here.`,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'do_in_app',
|
|
19
|
+
title: 'Do something in an app',
|
|
20
|
+
description: 'Open an app on the phone and carry out a task in it, step by step.',
|
|
21
|
+
args: {
|
|
22
|
+
app: z.string().describe('App name, e.g. "YouTube" or "Settings"'),
|
|
23
|
+
task: z.string().describe('What to do, e.g. "play the latest video from MKBHD"'),
|
|
24
|
+
},
|
|
25
|
+
text: ({ app, task }) => `On my Android phone, open ${app} and ${task}. Work step by step: after each action, read the updated element list and decide the next step; take a phone_screen only when you need to see images or layout. ${SAFETY} When you're done, tell me what you did and what's on screen now.`,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'test_my_app',
|
|
29
|
+
title: 'Test my app',
|
|
30
|
+
description: 'Walk through an app like a QA tester and report anything broken or confusing.',
|
|
31
|
+
args: {
|
|
32
|
+
app: z.string().describe('App name or package, e.g. "com.example.shop"'),
|
|
33
|
+
focus: z.string().optional().describe('Optional: a flow to focus on, e.g. "sign-up and checkout"'),
|
|
34
|
+
},
|
|
35
|
+
text: ({ app, focus }) => `Test ${app} on my Android phone like a careful QA tester${focus ? `, focusing on ${focus}` : ''}. Open it, go through its main screens and flows, and try edge cases (empty fields, back button, rotating, long text). Take a phone_screen of anything that looks wrong. ${SAFETY} Finish with a short report: what works, bugs found (with steps to reproduce), and UX issues.`,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'catch_up',
|
|
39
|
+
title: 'Catch me up',
|
|
40
|
+
description: 'Summarise the notifications that arrived on the phone.',
|
|
41
|
+
args: {},
|
|
42
|
+
text: () => `Read the notifications on my Android phone with phone_notifications and give me a short summary grouped by app, with anything that looks urgent first. Don't open or reply to anything.`,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'set_up_phone',
|
|
46
|
+
title: 'Set the phone up',
|
|
47
|
+
description: 'Change volume, brightness, Do Not Disturb and other quick settings in one go.',
|
|
48
|
+
args: {
|
|
49
|
+
settings: z.string().describe('What you want, e.g. "media volume 30%, brightness 60, Do Not Disturb on"'),
|
|
50
|
+
},
|
|
51
|
+
text: ({ settings }) => `On my Android phone, set: ${settings}. Use phone_volume, phone_brightness and phone_toggle where they fit; fall back to phone_settings and the screen only if needed. Then report the final values.`,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'send_to_phone',
|
|
55
|
+
title: 'Send files to the phone',
|
|
56
|
+
description: 'Send files from this computer to the phone and confirm where they landed.',
|
|
57
|
+
args: {
|
|
58
|
+
files: z.string().describe('File paths on this computer, separated by commas'),
|
|
59
|
+
},
|
|
60
|
+
text: ({ files }) => `Send these files from this computer to my Android phone with phone_send_files: ${files}. Then tell me where each one was saved on the phone.`,
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
export function registerPrompts(server) {
|
|
65
|
+
for (const p of PROMPTS) {
|
|
66
|
+
server.registerPrompt(p.name, { title: p.title, description: p.description, argsSchema: p.args }, (args) => msg(p.text(args || {})));
|
|
67
|
+
}
|
|
68
|
+
}
|