Skip to main content
Glama

key_event

Send Android key events over ADB to press buttons like home, back, volume, power, or enter a numeric keycode. Use it to control device navigation and hardware keys.

Instructions

Send a key event. Names: home, back, call, endcall, up, down, left, right, center, volume_up, volume_down, power, camera, tab, enter, delete, menu, search, play_pause, mute, recents, app_switch, wakeup, sleep; or a numeric keycode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
serialNoDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden, and it does disclose the accepted key vocabulary and the numeric-keycode fallback, which is meaningful. It says nothing about error behavior for unknown keys, whether the event is blocking, or device-state requirements, so the disclosure is partial.

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 four words, and the long value list that follows is functional rather than filler. The semicolon-heavy enumeration reads slightly like a dump, but every token earns its place as valid input.

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

Completeness4/5

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

For a simple two-parameter device command with no output schema, the description plus schema covers what an agent needs to construct a call. The remaining gap is behavioral (invalid-key handling, device prerequisites), which matters somewhat given the absence of annotations.

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 only 50%, and the undocumented parameter is `key` — the description compensates by enumerating 25 valid names plus the numeric keycode option, information absent from the schema (no enum). It does not add anything about `serial`, but the schema already documents that one.

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?

States a specific verb and resource ("Send a key event") and enumerates the accepted key identifiers, which makes the tool's scope unambiguous against siblings like tap, swipe, and type_text. It stops short of explicitly naming or contrasting an alternative, so it is clear rather than sibling-differentiating.

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?

There is no statement of when to prefer this tool over tap, type_text, or swipe, and no prerequisites (device connected, active app) are mentioned. The key-name list hints at remote-control navigation, but that is value guidance rather than usage guidance.

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