Skip to main content
Glama

Press key

press_key

Sends a key combination to a specified app to trigger shortcuts or commands, such as ctrl+a to select all.

Instructions

Send a key combination to the app, e.g. "ctrl+a" (macOS "super+a" is accepted and mapped).

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

Input Schema

NameRequiredDescriptionDefault
appYes
keyYes

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?

Annotations only declare readOnlyHint=false, so the description carries most of the burden. It adds genuinely useful behavioral detail that macOS "super+a" is accepted and mapped to ctrl, which is non-obvious normalization. It says nothing about focus requirements, what happens if the key is invalid or the app is not running, or what the call returns.

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 wasted wording, and the example is immediately adjacent to the claim it illustrates. The parenthetical mapping note is compact and earns its space.

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?

For a simple two-parameter mutation tool with no output schema this is close to sufficient, since the safety profile is carried by readOnlyHint=false. The missing piece is the meaning of `app` and any focus/targeting prerequisite, which an agent needs to call it correctly rather than guess.

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%, so the description must compensate for both parameters. It does a good job on `key` by giving an example format and the super→ctrl mapping, but `app` is never explained — no hint whether it is a name, identifier, or must match a value from list_apps.

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 ("Send a key combination to the app") with a concrete format example, so the agent knows this injects keyboard input into an app. It does not explicitly distinguish itself from the sibling browser_press_key or from type_text, so differentiation is left to inference.

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 combination" framing plus the ctrl+a example implies this is for modifier shortcuts rather than free text, which hints at the split with type_text. There is no explicit when-to-use, when-not, or prerequisite statement (e.g. whether the app must be focused first).

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