Skip to main content
Glama

ui_key

Send Android key events such as BACK, HOME, ENTER, or any KEYCODE to navigate apps and emulators via ADB.

Instructions

Press a key: BACK, HOME, ENTER, APP_SWITCH, DEL, TAB, DPAD_DOWN, MENU, SEARCH, or any KEYCODE_*.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name or numeric keycode.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
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 behavioral burden. It lists valid values but says nothing about whether a device must be connected/unlocked, whether the key goes to the foreground app, or whether the call returns or blocks.

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?

A single sentence with the verb front-loaded and the value domain immediately after; nothing is wasted or buried.

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 one-parameter input tool with no output schema and no annotations, the description covers what the tool does and what values are legal. The remaining gap is environmental context (device/foreground requirements) and sibling disambiguation, which are minor but real.

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% and already describes the single parameter, so the baseline would be 3. The description goes beyond it by enumerating concrete accepted key names and the KEYCODE_* fallback, which is real value since the schema declares no enums.

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 concrete verb ('Press') and resource ('a key') and enumerates the accepted key names, so the action is unmistakable. It does not distinguish itself from siblings such as ui_tap, ui_type, or ui_global_action, which could plausibly overlap for input events.

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

Usage Guidelines3/5

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

Usage is implied by the enumerated key names (navigation keys, DPAD, KEYCODE_*), suggesting hardware-key navigation rather than text entry. There is no explicit when-to-use statement, no exclusion of ui_tap/ui_type, and no prerequisite such as an app being in the foreground.

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

Deploy Server

Other Tools