Skip to main content
Glama

device_key

Press Android hardware or system keys like volume, home, back, and power via adb to control a connected device during testing, automation, or recording.

Instructions

Press a hardware/system key on an Android device via adb (USB or Wi-Fi debugging): volume_up, volume_down, mute, back, home, app_switch, enter, tab, delete, power, menu, escape.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "key": "<key>"
    },
    "name": "device_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
repeatNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It usefully discloses the transport ('via adb, USB or Wi-Fi debugging'), implying a device connection is required, but says nothing about return behavior, whether unsupported keys error out, or what 'power'/'back' actually do to device state. The existence and effect of the repeat loop is not addressed at all.

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

Conciseness3/5

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

It is a single front-loaded sentence with no filler prose, which is good. However, roughly half its length is a verbatim re-listing of the twelve-value enum already present in the schema, which is redundant weight rather than added information.

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?

For a simple two-parameter tool with no output schema, the description covers the essential purpose and transport context. The main gap is the undocumented `repeat` parameter and the absence of any note on failure modes or device-state side effects, which an agent would need for safe invocation.

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 0%, so the description must compensate. It fully spells out the valid values for `key` (matching the enum) but is completely silent on `repeat`, whose meaning (count? interval?) and constraints (1-20) are only discoverable from the schema. Partial compensation warrants a middling score.

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 gives a precise verb and resource ('Press a hardware/system key on an Android device via adb') and enumerates the supported keys, so an agent knows exactly what the tool does. It implicitly distinguishes itself from the UI-oriented siblings (app_tap, app_type) by framing this as a hardware/system key press, but never states that distinction explicitly.

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 toward or away from alternatives such as app_tap or app_type. The agent must infer that this tool is for hardware-level keys rather than on-screen interaction, and nothing warns about side effects like 'power' toggling the screen state.

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