Skip to main content
Glama

press_key

Send key events to Android devices by specifying keycode integers like BACK=4 or ENTER=66, enabling programmatic control through ADB connections.

Instructions

A key event sent to the Android device using the given keycode integer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keycodeYesAndroid keycode integer. Common: BACK=4, HOME=3, ENTER=66, RECENTS=187, TAB=61, DEL=67.
device_serialNoAndroid device serial (e.g. 'emulator-5554' or '192.168.1.10:5555'). Omit only when a single device is connected. If the tool returns a multi-device error: STOP. Present the device list to the user verbatim and wait for their explicit choice. Do NOT retry with a guessed or inferred serial — this is a hard requirement. Once the user provides a serial, use it for every subsequent call in this session. To switch devices mid-session, ask the user first.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the tool's behavior as sending a key event, implying an action on the device. The input schema adds critical behavioral context, such as error handling for multi-device scenarios and session persistence, which compensates well for the lack of annotations.

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?

The description is a single, efficient sentence that directly states the tool's purpose without waste. It is front-loaded and appropriately sized, earning its place by clearly conveying the core functionality.

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

Completeness5/5

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

Given the tool's complexity (device interaction), no annotations, and an output schema (which handles return values), the description combined with the detailed input schema provides complete context. The schema covers all parameters, usage rules, and error scenarios, making it fully adequate.

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 the schema fully documents parameters. The description adds no additional meaning beyond implying keycode usage, but the schema provides examples and constraints. Baseline 3 is appropriate as the schema handles parameter semantics effectively.

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 clearly states the action ('sent to the Android device') and resource ('key event'), specifying it uses a keycode integer. However, it doesn't differentiate from siblings like 'tap_screen' or 'type_text' beyond the general 'key event' concept, making it clear but not sibling-distinctive.

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?

The description explicitly states when to use this tool ('sent to the Android device using the given keycode integer'), and the input schema provides detailed guidance on device_serial usage, including when to omit it, error handling, and session management. This offers clear context and alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Neverlow512/agent-droid-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server