| name | clawpaw-control |
| description | Execute user instructions on the phone via ClawPaw MCP tools. Use when a user wants to do something on the phone โ send a message, open an app, tap something, take a screenshot, etc. |
ClawPaw Phone Control
Execute user instructions on the phone step by step using the ClawPaw MCP tools.
The MCP tools are available directly โ no curl, no API calls needed.
Available MCP Tools
UI / Interaction
snapshot โ Get the UI element tree (text, resource IDs, bounds, clickable state)
tap โ Tap by coordinates OR by text/resourceId/contentDesc
long_press โ Long press at x/y
swipe โ Swipe by direction shortcut (up/down/left/right) or explicit coordinates
type_text โ Type text into the focused field (supports Chinese, emoji)
press_key โ Press a key: home, back, enter, delete, wakeup, volume_up, volume_down, etc.
screenshot โ Take a screenshot (returns PNG image)
Device Info
battery โ Battery level, charging state, temperature
location โ GPS coordinates
network โ WiFi / mobile data status
storage โ Storage usage
screen_state โ Screen on/off, locked
Hardware
flashlight โ Get or set flashlight. Use on=true to turn on, on=false to turn off, omit to get state. Never pass action โ only on: boolean.
volume โ Get or set volume (stream: media/ring/alarm/notification, level: 0-15)
brightness โ Get or set screen brightness (level: 0-255)
vibrate โ Vibrate device (duration ms)
ringtone_mode โ Get or set ringer mode (silent/vibrate/normal)
media_control โ Control playback (action: play/pause/toggle/next/previous/stop)
Media
camera_snap โ Take a photo (back/front camera)
audio_record โ Record audio (action: capture/start/stop)
audio_status โ Check if recording is in progress
sensors โ Read accelerometer, gyroscope, light, etc.
Prerequisites โ Check Before Starting
ADB connectivity
If ADB commands fail (tap has no effect, snapshot empty), confirm:
- USB debugging enabled: Settings โ Developer options โ USB debugging
- Device authorized:
shell โ adb devices โ should show device (not unauthorized)
- If unauthorized: disconnect/reconnect USB, accept the prompt on the phone
ADB Keyboard (required for Chinese / emoji / non-ASCII input)
type_text with Chinese or emoji requires ADBKeyboard โ standard IME cannot receive arbitrary Unicode via ADB.
Setup:
- Install APK:
adb install ADBKeyboard.apk (download from GitHub: senzhk/ADBKeyBoard)
- Enable in settings: Language & Input โ Virtual keyboard โ Manage keyboards โ ADB Keyboard ON
- Set active:
shell tool โ ime set com.android.adbkeyboard/.AdbIME
- Verify:
shell โ ime list -s should include com.android.adbkeyboard/.AdbIME
If type_text produces wrong output or does nothing, re-run step 3 to reactivate ADBKeyboard.
Core Principles
snapshot FIRST โ screenshot is a fallback
Always use snapshot before acting on the screen. It returns real device-pixel bounds โ use those for all taps and interactions.
| Goal | Tool |
|---|
| Read screen content / find elements | snapshot |
| Tap / type / interact with elements | snapshot to get coords, then act |
| Verify a visual result after an action | screenshot |
| snapshot returns no useful elements (image, video, game) | screenshot as fallback |
Rules:
- NEVER guess coordinates from a screenshot โ screenshots may be scaled; bounds from
snapshot are accurate
- Do not call
screenshot unless: (a) user needs to see the screen visually, or (b) snapshot returned nothing useful
screenshot is a fallback, not the default observation tool
Tapping elements
- Call
snapshot โ get element list with bounds
- The
tap tool can match by text, resourceId, or contentDesc โ use that when possible
- If using raw coordinates: compute center from bounds
[left,top][right,bottom] โ x=(left+right)/2, y=(top+bottom)/2
Standard Execution Loop
For any user task:
- Wake screen โ
press_key wakeup
- snapshot โ read the current screen state
- Navigate โ
press_key home + tap, or shell am start if needed
- snapshot โ find element coordinates before acting
- Act โ tap, type, swipe
- snapshot โ verify result by reading updated UI state
- screenshot โ only if the user needs to see the screen visually, or snapshot gives no useful info
- Repeat until done
Common Patterns
Send an SMS
1. shell (via adb): am start -a android.intent.action.SENDTO -d sms:<PHONE> --es sms_body <TEXT> --ez exit_on_sent true
2. snapshot โ find send button by contentDesc="ๅ้็ญไฟก"
3. tap with contentDesc="ๅ้็ญไฟก" โ tap tool supports this directly
Open an app
tap with text="<app name>" โ if visible on home screen
-- or --
press_key home, then tap the app icon
Scroll
swipe with direction="up" โ scroll down (swipe up)
swipe with direction="down" โ scroll up (swipe down)
Type into a field
1. tap the input field (by text/resourceId)
2. type_text with the text to enter
Troubleshooting
| Symptom | Fix |
|---|
| Screen is black / screenshot all dark | press_key wakeup first |
| Tap has no effect | Use snapshot โ tap by text or contentDesc instead of coordinates |
| Element not found by text | Try snapshot to see all visible elements and their exact text |
| Chinese / emoji not typed correctly | ADBKeyboard not active โ run shell: ime set com.android.adbkeyboard/.AdbIME |
| type_text does nothing | ADBKeyboard not installed โ see Prerequisites section above |
| ADB commands silently fail | Check adb devices โ device may be unauthorized; reconnect USB and accept prompt |