Skip to main content
Glama

press_key

Sends one allowlisted key event (such as BACK, HOME, or ENTER) to an Android device so QA agents can navigate and test apps without shell access.

Instructions

Send one allowlisted key event.

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": "press_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesKey name, e.g. BACK, HOME, ENTER, DEL, TAB, DPAD_DOWN, APP_SWITCH.
serialNo

Output Schema

NameRequiredDescriptionDefault
actionYes
detailYes
serialYes
dry_runYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-destructive, closed-world behavior. The description adds two useful traits beyond that: the allowlist constraint on accepted keys and the fact that a single event is sent rather than a sequence. It does not say what happens on a rejected key or whether focus matters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler. It is efficient, though arguably terse to the point of omitting a needed when-to-use clause.

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?

An output schema exists and annotations cover the safety profile, so the remaining burden is small. Still, for a tool whose main failure mode is an invalid or non-allowlisted key, the description leaves error behavior and device-selection behavior undocumented.

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% and the key field already enumerates examples (BACK, HOME, ENTER, etc.) plus the serial parameter documents its list_devices source and optionality. The description adds only the allowlist implication for key values, no extra syntax or format detail.

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?

States a specific verb (send) and resource (one key event) and adds the qualifier 'allowlisted', which distinguishes it from text entry or tapping tools. It does not explicitly name the siblings it differs from, but the action is unambiguous.

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

Usage Guidelines2/5

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

No guidance on when to use this versus input_text or tap, nor on device/context prerequisites. The only hint is 'allowlisted', which implies a constrained key set but does not explain the boundary or the alternative for non-allowlisted keys.

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