Skip to main content
Glama

press_key

Destructive

Sends key presses or combinations to a specified Hyprland app for automation, using xdotool-style syntax like ctrl+v or alt+left.

Instructions

Press a key or key-combination, using xdotool-style syntax such as ctrl+v, Return, alt+left, or super+c.

Input Schema

NameRequiredDescriptionDefault
appYesApp name, Hyprland class/title, pid, or address:0x... selector.
keyNoKey or key-combination to press.
keysNoCompatibility shortcut string, for example alt+left.
repeatNoNumber of times to repeat the key. Defaults to 1.
keycodeNoRaw evdev keycode, ydotool-style.
modifiersNoOptional modifiers when key is a bare key, for example alt.
confirmation_tokenNoExternally approved, one-time challenge ID from request_confirmation for a high-risk action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and openWorldHint=true, so the safety profile is covered. The description adds nothing about the required 'app' targeting, that keystrokes are delivered asynchronously, or that high-risk presses may need the confirmation_token flow via request_confirmation — meaningful context that is absent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with a clear verb and inline examples; no filler or redundancy.

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 7-parameter, destructive, no-output-schema tool the description is thin: it omits the mandatory app-targeting semantics and the high-risk confirmation path, though the schema's field-level descriptions carry much of the remaining burden.

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 100%, so the baseline is 3, but the description genuinely adds value by showing the xdotool-style syntax (ctrl+v, Return, alt+left, super+c) that the bare schema text 'Key or key-combination to press' does not convey. It still says nothing about the precedence between key/keys/keycode/modifiers.

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 states a specific verb (press) and resource (key or key-combination) with concrete syntax examples. However, it does not distinguish itself from the sibling tool 'key', which appears to be the same or a very similar operation, nor from type_text/type.

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

Usage Guidelines2/5

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

No guidance on when to use this versus the near-identical sibling 'key', nor when a full text-entry tool (type_text, paste_text) would be preferable. The agent is left to guess between overlapping keypress tools.

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