Skip to main content
Glama

Press key

key_press
Read-only

Press hardware or navigation keys like BACK, HOME, ENTER, or any KEYCODE on an Android device, enabling UI automation and testing.

Instructions

Press a hardware/navigation key: BACK, HOME, ENTER, TAB, DELETE, ESCAPE, MENU, APP_SWITCH, DPAD_*, or any KEYCODE_ name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name
serialNoDevice serial (defaults to session or the only device)
Behavior3/5

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

Annotations include readOnlyHint=true, and the description adds no behavioral context beyond listing accepted key names. It does not disclose side effects, device requirements, or whether the key press is synchronous, but the action is straightforward and the readOnly annotation suggests safety.

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, concise sentence that front-loads the action and then lists valid key names. There is no redundancy or filler.

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 simple two-parameter tool with full schema coverage and a readOnly annotation, this description is mostly sufficient. It supplies the key enumeration that the schema lacks, though it omits explicit usage guidance, which is not critical for this straightforward operation.

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?

The schema already provides 100% parameter descriptions, so a baseline of 3 applies. The description adds meaningful value by enumerating the valid values for 'key' (BACK, HOME, ENTER, etc.), which is more specific than the schema's generic 'Key name'.

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?

The description uses the specific verb 'Press' with the resource 'hardware/navigation key' and enumerates valid key names, making its function completely clear. It implicitly distinguishes from sibling key_sequence by focusing on a single key press.

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?

The description states what the tool does but does not specify when to use it over alternatives like key_sequence or tap, nor does it mention any prerequisites or exclusions. Usage context is only implied by the singular 'a key'.

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/dev-jackson/androidbuild-mcp'

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