Skip to main content
Glama

key

Sends button presses or keyboard inputs to Android emulators, Apple simulators, and macOS apps for navigation, text entry, and automated app testing.

Instructions

Press a key or hardware button. Android: up, down, left, right, select, enter, escape, back, home, menu, space, letters, digits. Apple TV (the remote): up, down, left, right, select, menu, playpause, home. iOS: home. Apple Vision Pro: up, down, left, right. mac: arrows, enter, escape, space, tab, letters, digits.

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": {
      "device": "<device>",
      "key": "<key>"
    },
    "name": "key"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNoApp id: Android package, Apple bundle identifier; on "mac" the bundle identifier or app name (required there)
keyYes
timesNoPress it this many times. Default 1
deviceYesDevice id (or exact name) from the devices tool
screenshotAfterMsNoIf set, wait this many milliseconds after the action and return a screenshot too

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries full burden: it discloses the platform-specific accepted vocabulary, which is genuine behavioral content, including that Apple Vision Pro supports only directional input and iOS only home. It does not say what happens on an unsupported key (error vs no-op), whether the key goes to the foreground app, or that 'app' is mandatory on mac — those gaps matter for a no-annotation tool.

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?

One short opening sentence followed by platform-tagged lists; every clause is load-bearing because each platform has a different valid set. No filler, and the core action is front-loaded before the enumeration.

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 5-parameter input tool with no output schema, the definition covers the hardest part — which key strings are legal per platform — while times, screenshotAfterMs, and device are handled by the schema. It is nearly complete, lacking only failure behavior for invalid keys and explicit cross-references to type_text/tap.

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?

Schema coverage is 80% overall, but the 'key' property itself has no description and no enum, so the per-platform enumerations in the description are the only source of valid values — a real addition over the schema. It also indirectly signals the platform dependence of 'app', though the mac requirement is left to the schema text.

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 concrete verb and resource ('Press a key or hardware button') and immediately enumerates the valid key names per platform, so an agent knows exactly what class of action this is. It doesn't explicitly contrast with siblings like tap or type_text, so the differentiation is only implicit.

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 platform-by-platform key lists imply when this tool applies (remote/D-pad/navigation input rather than free text), but there is no explicit statement of when to choose it over type_text, tap, or gamepad, nor any prerequisites. Guidance is inferable rather than stated.

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