Skip to main content
Glama

press_key

Sends keyboard key presses or key combinations to trigger shortcuts, navigate interfaces, or invoke function keys.

Instructions

Press a key or key combination. Use for shortcuts (cmd+c), navigation (tab, enter, escape, arrows), or function keys.

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
keyYesKey to press: a-z, 0-9, return/enter, tab, space, backspace, delete, escape, up/down/left/right, home, end, pageup, pagedown, f1-f12
modifiersNoModifier keys to hold

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It never states that the target application must be focused for the keystroke to land (a real prerequisite given a focus_app sibling exists), nor whether the call is synchronous, how long it blocks, or whether layout/modifier conventions are platform-specific. The cmd+c example is the only behavioral hint.

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?

Two short sentences, front-loaded with the core action followed by use-case examples; no filler. The second sentence is a useful list rather than padding, so the length is well judged for a simple two-parameter tool.

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?

The tool is simple, the schema is fully documented, and there is no output schema to explain, so little prose is needed. The remaining gap is the focus-routing prerequisite — an agent cannot tell from this definition which window receives the keypress, which matters for a computer-use tool.

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 100%, with the key parameter enumerating accepted values and modifiers documented with its enum and default. The description adds nothing beyond those structured fields — the cmd+c example merely restates schema content. Baseline 3 applies.

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 opens with a specific verb and resource: 'Press a key or key combination.' That is unambiguous and distinguishes it in kind from siblings like type_text and mouse_click, though it never names those siblings explicitly.

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?

It gives concrete usage contexts — shortcuts (cmd+c), navigation (tab, enter, escape, arrows), function keys — which is clear positive guidance. It stops short of explicit exclusions, e.g. that arbitrary text strings belong to type_text, so the boundary with that sibling must be inferred.

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