Skip to main content
Glama

Shake an iOS simulator or Android emulator

shake

Simulate a shake gesture on an iOS simulator or Android emulator so apps that respond to motion-shake or accelerometer events trigger, then take a snapshot to observe the result.

Instructions

Shake an iOS simulator or an Android emulator once. iOS posts the shake notification that Device > Shake in the Simulator app posts, which UIKit delivers to the app as a motion-shake event; it injects no accelerometer data, so an app that detects shakes through CoreMotion does not see it. Android swings the emulator's accelerometer about 2 g in alternating directions for about a second through the emulator console, then restores the reading it found, so an app that counts direction changes above a force threshold sees a shake. The shake is sent without activating the session app and nothing is re-observed afterwards, so take a snapshot to see what the app did with it. Physical devices, Android TV, remote provider devices, and every other platform refuse this command. Times out after 90s.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
udidNoApple device or simulator UDID.
deviceNoDevice name; ids go in udid or serial.
serialNoAndroid, HarmonyOS, or Vega VVD serial.
sessionNoSession name.
noRecordNoDo not record this action.
platformNoDevice platform.
deviceTargetNoDevice form factor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.21.42

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description goes much further, disclosing that iOS posts a notification rather than injecting accelerometer data, that Android swings the accelerometer ~2g for about a second and restores the prior reading, that the session app is not activated, and that nothing is re-observed. That is exactly the behavior an agent needs. It narrowly misses a 5 only because some criteria in the rubric, such as permissions/auth, are not addressed, though the refusal rules and 90s timeout cover most of that ground.

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?

Purpose is front-loaded in the first clause, and every following sentence carries distinct information (platform divergence, side effects, refusals, timeout). The single dense paragraph is long but nearly all of it earns its place, with only minor compression possible.

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?

For a mutation-style input-injection tool with no output schema, the description covers the platform split, the side effect on device state, the observation gap and the recommended follow-up, plus refusal conditions and the 90s timeout. Nothing an agent needs in order to call it correctly is missing.

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 description coverage is 100%, so every parameter is already documented in the schema. The description adds no parameter-level meaning (e.g. which of udid/device/serial wins, or how platform interacts with deviceTarget), so the baseline of 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?

The first sentence gives a specific verb and resource ("Shake an iOS simulator or an Android emulator once") and the rest distinguishes platform-specific mechanics rather than restating the title. The agent can tell this apart from sibling gesture/input tools like gesture or action-button.

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?

It states the exclusion clearly — physical devices, Android TV, remote provider devices and other platforms refuse the command — and advises taking a snapshot afterwards to observe the result. It stops short of naming a sibling alternative for the refuse cases, but the context is unambiguous.

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