Skip to main content
Glama

press_key

Simulates iPhone hardware and keyboard key presses—back, home, lock, volume, enter, navigation, and editing keys—so an agent can control a real device during automation.

Instructions

Press: back, home, lock, volume_up, volume_down, enter (also search/go/send/done: taps the keyboard's action key when shown), backspace, tab, escape, space, up, down, left, right.

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
keyYes
max_wait_msNo
observe_afterNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/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 disclosure burden; it does add one genuine behavioral detail — the search/go/send/done alias resolving to the keyboard action key when one is shown. It says nothing about the max_wait_ms timeout or observe_after side effect (whether an observation/state snapshot is produced), nor about failure behavior for unsupported keys, which are the traits an agent most needs before calling.

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 zero filler; the accepted-value list is the payload and the parenthetical is worth its space. It is dense but not padded, and the enter aliasing is correctly nested next to the key it modifies.

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, so return values need no explanation, and the key set is fully specified. But for a three-parameter interaction tool with no annotations, missing coverage of max_wait_ms and observe_after — including whether observe_after triggers a state capture or an extra round trip — leaves the definition only minimally sufficient.

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 description coverage is 0% for three parameters, so the description must compensate; it fully compensates for `key` by listing every accepted value and the enter-to-action-key mapping, none of which appears in the schema. The other two parameters (`max_wait_ms`, `observe_after`) receive no mention at all, leaving half the argument surface undocumented in both places.

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 enumerates the exact key set the tool accepts (back, home, lock, volume_up/down, enter, backspace, tab, escape, space, and the four directions), which makes the resource unambiguous and doubles as the accepted-value list. It never states in plain terms that the key is sent to the active app/device, and it does not distinguish itself from siblings like tap, long_press, or type_text, so it falls short of a 5.

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 key enumeration implicitly scopes usage to navigational/system keys and the parenthetical notes the enter variant maps to search/go/send/done action keys when shown, which is real conditional guidance. However, there is no explicit statement of when to prefer this over type_text for text input or tap for on-screen buttons, and no prerequisites such as requiring a focused app.

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