Skip to main content
Glama

android_key_event

Send key events to Android devices for testing automation, including navigation, media controls, and system functions like HOME, BACK, VOLUME, and POWER.

Instructions

Send a key event to an Android device/emulator. Common keys: HOME, BACK, CALL, END_CALL, VOLUME_UP, VOLUME_DOWN, POWER, CAMERA, CLEAR, TAB, ENTER, DEL, MENU, SEARCH, MEDIA_PLAY_PAUSE, MEDIA_STOP, MEDIA_NEXT, MEDIA_PREVIOUS, MOVE_HOME, MOVE_END, APP_SWITCH, ESCAPE

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name (HOME, BACK, CALL, END_CALL, VOLUME_UP, VOLUME_DOWN, POWER, CAMERA, CLEAR, TAB, ENTER, DEL, MENU, SEARCH, MEDIA_PLAY_PAUSE, MEDIA_STOP, MEDIA_NEXT, MEDIA_PREVIOUS, MOVE_HOME, MOVE_END, APP_SWITCH, ESCAPE) or numeric keycode
deviceIdNoOptional device ID. Uses first available device if not specified.
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Send a key event' implies a write/mutation operation, it doesn't clarify if this requires specific permissions, whether it's reversible, potential side effects (e.g., app navigation), or error handling (e.g., invalid deviceId). The description lacks critical behavioral context for a mutation tool with zero annotation coverage.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a helpful list of common keys. Every sentence earns its place—no redundant or vague language. It efficiently conveys essential information without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's complexity (a mutation operation with no annotations and no output schema), the description is minimally adequate. It covers the basic purpose and parameters but lacks details on behavioral traits, error handling, or return values. For a tool that interacts with devices, more context on prerequisites and outcomes would improve completeness.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds value by listing common key names (e.g., HOME, BACK) beyond the schema's generic 'Key name' description, providing practical examples. However, it doesn't explain the semantics of numeric keycodes or deviceId selection in depth, keeping it at a 4 rather than 5.

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

Purpose4/5

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

The description clearly states the action ('Send a key event') and target ('to an Android device/emulator'), providing a specific verb+resource combination. It distinguishes itself from sibling tools like android_input_text (for text input) and android_tap (for touch interactions) by focusing on key events. However, it doesn't explicitly differentiate from ios_key_event (its iOS counterpart), which is a minor gap.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when key events are preferred over other input methods (like android_input_text for text or android_tap for touch), nor does it specify prerequisites (e.g., device must be connected). The list of common keys is helpful but doesn't constitute usage guidelines.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/igorzheludkov/metro-logs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server