Skip to main content

app_shake

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Shake the device — what shake-to-undo, shake-to-report and a debug menu listen for. An iOS simulator is sent the shake its Device menu sends, which UIKit delivers as a motion event; an Android emulator's accelerometer is swung side to side for about 1.5s and put back at rest, which an app's shake detector sees as a shake. Whether the app reacts is its detector's business: check the screen after. A real phone refuses — nothing outside it can move its sensors.

Changes the device, the app or the session: readOnlyHint is false.

Arguments​

NameTypeRequiredWhat it is
devicestringDevice serial to target, e.g. "emulator-5554". Omit when only one device is running.
driverstring: uiautomator2, uiautomator, wdaDriver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones).

Examples​

Each is the arguments of a tools/call request; the first is shown whole.

Shake the device​

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_shake",
"arguments": {}
}
}

On an Android 15 emulator the answer's text was:

sent a shake on the emulator's accelerometer, ±20 m/s² side to side for about 1.5s, then back at rest; whether the app reacts is up to its own shake detector