Skip to main content
Glama

Press safe Android key

android_press_key

Press an allow-listed Android key such as HOME, BACK, or ENTER to control a device through ADB; unsupported key codes are rejected.

Instructions

Press one allow-listed Android key; arbitrary key codes are not accepted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "key": "<key>"
    },
    "name": "android_press_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
deviceNoADB serial. Omit when exactly one device is ready.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false), so the description does not need to establish that. It adds the allow-list constraint, but the enum in the schema already shows exactly which keys are valid, so the added value is modest. Nothing is said about what pressing a key does to the foreground app (e.g., BACK navigating away) or whether the call waits for the effect.

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?

A single tight sentence with the core action and the key constraint front-loaded and no wasted wording.

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 two-parameter action tool with annotations covering safety and no output schema, the definition is adequate but leaves gaps: the effect of each key press, whether the call is synchronous, and how the result is reported are all unstated.

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%: the device parameter is documented in-schema while key relies on its enum to self-document. The description contributes only the 'one ... key' and 'allow-listed' framing, confirming singular input and enum restriction without adding format or behavior detail, so baseline 3 is appropriate.

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 pairs the specific verb 'press' with the specific resource 'Android key' and adds a scoping constraint ('one allow-listed Android key; arbitrary key codes are not accepted'), which separates it in spirit from coordinate-based android_tap and text-based android_type_text. It stops short of naming a sibling, so it is clear but not maximally differentiating.

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?

Usage is implied by the 'one key' and 'allow-listed' constraints, which tell the agent this is for single discrete key presses from a fixed set rather than arbitrary input. There is no explicit when-to-use or when-not-to-use guidance relative to android_tap or android_type_text, and no stated prerequisites.

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