Skip to main content
Glama

Press keys

key

Send keyboard shortcuts and navigation commands to a peer device to trigger Return, Escape, Tab, ctrl+c, alt+F4, or Android back/home/recents.

Instructions

Press a key or chord on the peer: Return, Escape, Tab, Backspace, Up, F5, ctrl+c, cmd+s (macOS), alt+F4, win+r ... Android also takes back / home / recents.

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

Input Schema

NameRequiredDescriptionDefault
keysYes
peerYesThe peer's 9-digit rockd ID (from `devices` / `status`), or IP:port to dial directly

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, so the agent knows this mutates a remote peer, and the description adds platform-specific behavior (cmd on macOS, back/home/recents on Android). It does not address what happens with an unrecognized key name, whether the key is held or a single tap, or what the response reports, all of which matter for a remote-input action.

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?

One sentence, front-loaded with the action and target, followed by a compact example list; the trailing ellipsis is slightly loose but the sample set is worth the tokens for format discovery.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter input tool with no output schema, the definition covers the target peer concept (reinforced by the schema's rockd ID note), the key/chord string convention, and cross-platform quirks — enough to call it correctly.

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 50% — only peer is documented in the schema, leaving keys bare. The description compensates by demonstrating keys' expected string format, including named keys (Return, F5) and chord syntax (ctrl+c, cmd+s, alt+F4), which is genuine added meaning over the bare type:string.

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 and resource — pressing a key or chord 'on the peer' — and the examples (Return, ctrl+c, alt+F4) make it obvious this is discrete keystroke injection rather than text entry like type_text. It stops short of naming sibling tools, so the contrast with type_text/click is left 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?

Usage is implied by the examples: use this for individual keys or modifier chords, with a platform note that Android accepts back/home/recents. There is no explicit 'use this instead of type_text when...' guidance or statement of failure/prerequisite conditions, so an agent must infer the boundary.

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