Skip to main content
Glama

shake

Send a motion gesture to an iOS simulator or Android emulator to trigger undo/redo prompts, React Native debug menus, or app-specific handlers.

Instructions

Send a shake gesture to the device (iOS simulator or Android emulator). Use when you need to trigger anything bound to the shake gesture: iOS's "Undo Typing" / "Redo Typing" prompt in a text field, React Native's developer menu in a debug build, or an app's own shake-to-report handler. iOS delivers one discrete shake per gesture (the same motion event a physical device raises). Android has no OS-level shake event: the accelerometer is driven through a burst of hard direction changes so app-side detectors fire, and the resting orientation is restored afterwards. Returns { shaken: true, count }. Works on local and remote (sim-remote) iOS simulators. Fails on a physical device or a TV: only phone/tablet simulators and emulators are supported.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "udid": "<udid>"
    },
    "name": "shake"
  }
}

Input Schema

NameRequiredDescriptionDefault
udidYesTarget device id from `list-devices` (iOS simulator UDID or Android emulator serial).
countNoHow many shake gestures to deliver back-to-back (default 1). Raise it for apps whose shake detector needs sustained motion before it fires. Range: 1 to 10.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / count / description
      Previous value: -"How many shake gestures to deliver back-to-back (default 1, max 10). Raise it for apps whose shake detector needs sustained motion before it fires."New value: +"How many shake gestures to deliver back-to-back (default 1). Raise it for apps whose shake detector needs sustained motion before it fires. Range: 1 to 10."
  2. Addedv0.22.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so thoroughly: iOS emits one discrete motion event per gesture while Android fakes accelerometer bursts and restores orientation afterwards. It also discloses the supported environments (local and sim-remote simulators), failure modes (physical device, TV), and the return shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and its use case, then platform behavior, then return value, then constraints — a sensible ordering. The Android accelerometer explanation is the densest part but earns its place by explaining why count may need raising.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite a missing output schema, the description states the return value ('{ shaken: true, count }') and covers platform semantics, environment support, and failure conditions. Nothing an agent needs to invoke this correctly is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the schema itself already explains udid's source and count's purpose including the recommendation to raise it for slow detectors. The description's Android burst behavior loosely justifies count but adds little parameter meaning the schema lacks; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Send a shake gesture to the device') and immediately scopes it to simulators/emulators. The examples of what the gesture triggers (Undo Typing, React Native dev menu, shake-to-report) make it unmistakable against gesture siblings like gesture-tap or gesture-custom.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear triggering condition ('Use when you need to trigger anything bound to the shake gesture') and an explicit exclusion ('Fails on a physical device or a TV'). It does not name an alternative tool for cases where shake isn't supported, but no sibling appears to cover that need, so the guidance is complete for practical selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.