Skip to main content
Glama

Send key

adb_key

Send key events like HOME, BACK, or DPAD to Android TV boxes, phones, or watches over ADB; optionally verify activity/UI to confirm the key took effect.

Instructions

Send a keyevent. Accepts names (HOME, BACK, ENTER, DPAD_UP, POWER, VOLUME_UP, MENU, TAB...) or numeric codes. On TV boxes DPAD_UP/DOWN/LEFT/RIGHT move the focus and DPAD_CENTER presses it. verify="activity"|"ui" reports whether the key changed anything; see adb_tap for the same parameter. For text use adb_text; for a labelled element, adb_find_and_tap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name (HOME, BACK, ENTER, DPAD_CENTER, WAKEUP...; the KEYCODE_ prefix is optional) or a numeric keycode.
serialNoDevice serial from adb_devices. Optional when exactly one device is connected.
verifyNoDefault "none". See adb_tap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the bar is lower. The description adds real non-annotation context: DPAD_UP/DOWN/LEFT/RIGHT move focus and DPAD_CENTER activates, and verify="activity"|"ui" reports whether the key changed anything. It stops short of stating failure behavior for invalid keycodes or any blocking/timeout characteristics.

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?

Front-loads the core action in three words, then layers input format, device behavior, verification, and sibling routing in short clauses. No sentence is redundant and nothing is 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 3-parameter, no-output-schema tool with annotations already covering safety, the description supplies the essential context: accepted key forms, verify semantics, and alternative tools. Minor gaps (whether calls block until the key is processed, handling of invalid keycodes) remain, but nothing needed to invoke it correctly is missing.

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 100%, so all three parameters are already documented, establishing a baseline of 3. The description adds some semantic value beyond the schema (expanded key name examples, numeric-code acceptance, DPAD navigation behavior), but defers verify entirely to adb_tap rather than explaining it here.

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

Purpose5/5

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

States a specific verb+resource ("Send a keyevent") and immediately bounds the input domain (named keys or numeric codes). It explicitly distinguishes itself from siblings by naming adb_text and adb_find_and_tap as the right tools for those alternate tasks, so an agent can route correctly without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit routing rules: use adb_text for text input and adb_find_and_tap for a labelled element, i.e. when-not-to-use-this is covered. It also explains the verify parameter's role in confirming effect, matching the sibling adb_tap convention.

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