Skip to main content
Glama

Send key event

phone_key

Send Android key events such as HOME, BACK, ENTER, or VOLUME_UP to automate device control over ADB and receive the resulting UI screen.

Instructions

Send an Android keyevent such as HOME, BACK, ENTER, TAB, DELETE, APP_SWITCH, POWER, VOLUME_UP, VOLUME_DOWN, DPAD_UP/DOWN/LEFT/RIGHT, PASTE. Returns the resulting screen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name or KEYCODE_* or numeric keycode
observeNoRe-dump the UI after the action (default true)
settleMsNoWait before re-observing, milliseconds
includeScreenshotNoInclude a PNG screenshot in the response

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?

No annotations exist, so the description carries the full burden. It does disclose the return shape ("Returns the resulting screen"), which is useful, but it says nothing about side effects of keys like POWER (screen off), or that re-observation happens by default — the latter only surfaces in the schema.

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?

Two sentences, front-loaded with purpose and then the value list; nothing is padding. The key enumeration is long but earns its place as a usage hint, though it slightly buries the return-value statement.

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 4-param, mutation-style tool with no output schema and no annotations, the description covers what it does, valid inputs, and the return. Missing only side-effect caveats and sibling routing, which keeps it short of complete.

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 coverage is 100%, so the baseline is 3, but the description exceeds it by enumerating concrete accepted key names (HOME, BACK, ENTER, DPAD_UP/DOWN/LEFT/RIGHT, PASTE) that the schema only refers to abstractly as "Key name or KEYCODE_* or numeric keycode".

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 an Android keyevent") and enumerates concrete key values, so an agent knows exactly what this does. It does not, however, distinguish itself from siblings that are effectively keyevent wrappers (phone_back, phone_home), leaving overlap unaddressed.

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 when-to-use or when-not-to-use guidance and no routing to alternatives. With phone_back, phone_home, and phone_type present, an agent gets no signal about whether to call those dedicated tools or send BACK/HOME/PASTE through phone_key.

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