Skip to main content
Glama

Press a key

key_press

Press any keyboard key, including return, tab, escape, arrows, or characters, with optional command, option, control, or shift modifiers to trigger actions and shortcuts in macOS.

Instructions

Press a key (e.g. return, tab, escape, arrows, or a character) with optional modifiers (command/option/control/shift). Requires admin mode AND MACCTL_ALLOW_INPUT=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name (return, tab, escape, up…) or a single character.
modifiersNoModifier keys to hold.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate it is not read-only (readOnlyHint=false) and not destructive (destructiveHint=false). The description adds a crucial constraint: it requires admin mode and MACCTL_ALLOW_INPUT=true. This is valuable context beyond the annotations. It does not contradict the annotations and gives a concrete prerequisite for successful invocation.

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?

The description is a single, front-loaded sentence that states the action, examples, modifiers, and prerequisites in order of importance. There is zero redundancy or filler. Every element earns its place, making it optimally concise for an agent to parse quickly.

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

Completeness4/5

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

For a simple 2-parameter tool with no output schema, the description covers the core functionality, gives examples, and states the critical admin mode requirement. It does not explain what happens on failure or whether the action is synchronous, but given the low complexity and existing annotations, it is adequately complete for an agent to invoke correctly.

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?

The schema provides 100% coverage for both parameters with clear descriptions ('Key name (return, tab, escape, up…) or a single character' and 'Modifier keys to hold'). The description reinforces these by listing examples and modifier names, but it does not add substantive new meaning beyond what the schema already states. Given high coverage, the baseline of 3 is appropriate.

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?

The description clearly states the tool presses a key, provides specific examples (return, tab, escape, arrows, character), and mentions optional modifiers. This distinguishes it from siblings like type_text (types a string) and click (mouse action), even though it doesn't name them explicitly. The verb+resource is precise and actionable.

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 description implies usage by explaining what it does (press a key) and the modifiers, but it does not explicitly say when to use this tool over alternatives like type_text or scroll. There are no exclusions or conditions like 'use for single key shortcuts, not for text input.' The context is clear but guidance on selection is left to inference.

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