Skip to main content
Glama

android_key

Press Android hardware keys such as BACK, HOME, or ENTER on a device, optionally capturing a screenshot to confirm the action.

Instructions

Press a hardware/system key.

Args: key: BACK, HOME, ENTER, TAB, DEL, APP_SWITCH, MENU, POWER, VOLUME_UP, ... The KEYCODE_ prefix is added automatically, and a raw keycode number also works. device: Device serial; defaults to the first physical device. screenshot: Return a screenshot of the result. scale: Long-edge px for that screenshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
scaleNo
deviceNo
screenshotNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses that the KEYCODE_ prefix is auto-added and a raw keycode number works, and that a screenshot can be returned. However, it does not describe side effects of pressing (e.g., navigation), error conditions, or device selection behavior beyond the default, which is a notable gap for a tool with zero annotation coverage.

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 compact and front-loaded with the purpose, followed by a clearly formatted argument list. Every sentence earns its place; there is no fluff or redundant content. The structure makes key details instantly scannable for an agent.

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 press-action tool with no output schema, the description covers core parameters well. However, it omits return value details (e.g., what happens when screenshot is false), potential errors, and any prerequisites like device connectivity. Given the simple nature, it's adequate but not fully complete.

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?

Given the 0% schema description coverage, the description effectively explains each parameter: key lists valid values, device specifies serial default, screenshot indicates a screenshot return, and scale defines screenshot resolution. It adds meaning beyond the raw schema types, though it could be more exhaustive (e.g., valid key list is incomplete).

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 tool presses a hardware/system key, using a specific verb and resource. It distinguishes from sibling tools like tap, swipe, and type by focusing on hardware keys, though it doesn't explicitly name alternatives. The list of example keys adds specificity.

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 implies usage for hardware/system keys when touch or typing is not appropriate, but it does not explicitly state when to prefer this tool over android_tap, android_swipe, or android_type. No exclusions or preconditions are mentioned, leaving the agent to infer the context from the tool name and description.

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