Skip to main content
Glama

Press key

press_key

Press keys or buttons on iOS and Android devices and simulators, including navigation, volume, letters, and modifier combos, then return the updated screen.

Instructions

Press a key or button: back, home, enter, delete, tab, escape, space, arrow_up/down/left/right, app_switch, volume_up/down, mute, siri, power, lock; a letter or digit, held keys first: command+a (Android: Ctrl). hide_keyboard closes the on-screen keyboard. control_center, notification_center, spotlight open those; home closes them. Words: type_text. Returns the screen after.

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
readNo
countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description usefully adds 'Returns the screen after', telling the agent a screen state comes back, but says nothing about what the read enum does (diff vs full vs none) or what count means (repeat/long-press), which is material for a tool that changes device UI state.

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?

Front-loaded with the verb and the value list, then behavior notes, then the alternative — every clause carries information. The semicolon-dense packing and the clipped fragment 'Words: type_text.' cost a little readability but waste no words.

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?

With no output schema, 'Returns the screen after' appropriately covers the return value, and the key vocabulary is thorough. However, for a 3-parameter tool with 0% schema coverage, the unanswered read and count semantics leave the definition incomplete for full invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry all parameter meaning. It does an excellent job on key (enumerated values plus held-key syntax like command+a / Ctrl), but read (diff/full/none) and count are never mentioned, leaving two of three parameters entirely opaque.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (press) and resource (key/button) and then enumerates the accepted values, so an agent can tell immediately whether its target key is supported. It also explicitly separates itself from type_text with 'Words: type_text', so the sibling boundary is clear without opening either schema.

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

Usage Guidelines4/5

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

Gives concrete routing: use type_text for words, hide_keyboard to dismiss the on-screen keyboard, control_center/notification_center/spotlight to open those surfaces, and home to close them. It does not state prerequisites (an active device session, focused keyboard) or any when-not-to-use case, so it stops just short of a full 5.

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