Skip to main content
Glama

key_event

Send any Android keycode (e.g., KEYCODE_ESCAPE or 66) to control keys not covered by press_button. Specify the keycode and optional device serial to trigger the input.

Instructions

Send any Android keycode (e.g. KEYCODE_ESCAPE, 66) — for keys not covered by press_button

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNoDevice serial (e.g. emulator-5554). Optional when exactly one device is connected.
keycodeYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It only states the action (send a keycode) without mentioning side effects, permissions, error handling, or response behavior. For a tool that sends an event, an agent would benefit from knowing if it can be safely repeated, what happens on invalid keycodes, or whether it requires a focused window. This is a significant gap given the absence 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 sentence that front-loads the core action, provides illustrative examples, and immediately clarifies its scope relative to a sibling tool. Every word earns its place; there is no padding or redundancy.

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 tool with only two parameters and no output schema, the description is largely sufficient. It covers the purpose, gives an example for the main parameter, and the serial parameter is documented in the schema. The only minor gap is lack of detail on error handling or invalid keycode behavior, but given the tool's simplicity and the examples provided, an agent can call it correctly in most cases.

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 coverage is 50% (only serial has a description; keycode is just a string). The description adds value by providing examples of valid keycode formats ('KEYCODE_ESCAPE, 66'), which partially compensates for the missing schema description. However, it does not enumerate all possible keycodes or explain the accepted format beyond examples, so the agent may still be uncertain about how to specify arbitrary keys. The examples help but are not comprehensive.

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 clearly states the action ('Send any Android keycode'), gives concrete examples (KEYCODE_ESCAPE, 66), and explicitly distinguishes it from the sibling press_button ('for keys not covered by press_button'). An agent immediately knows what this tool does and how it differs.

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

Usage Guidelines4/5

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

The description provides a clear when-to-use condition: for keys not covered by press_button. This is an explicit exclusion that routes the agent correctly. It does not mention when not to use it (e.g., for text input, use type_text), but the primary alternative is covered, making the guidance effective if not exhaustive.

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

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/Sajinthan/android-emulator-mcp'

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