Skip to main content
Glama

press_key

Press specific keys with modifiers like command, shift, option, or control. Optionally focus an app before pressing the key combination.

Instructions

Press a key combo (e.g. press 's' with ['command'] for Cmd+S). Supports a-z, 0-9, return, tab, space, delete, escape, arrows, f1-f12. If app is specified, focuses that app first. Prefer batch_actions when combining with other actions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name: a-z, 0-9, return, tab, space, delete, escape, up/down/left/right, f1-f12
modifiersNoModifier keys: 'command', 'shift', 'option', 'control'
appNoApp to focus before pressing key (e.g. 'Google Chrome', 'Notes').
Behavior3/5

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

No annotations provided, so description carries full burden. It mentions focusing an app as a side effect but lacks details on error handling, timing, or global vs app-specific key presses. Adequate but not exhaustive.

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?

Three sentences, front-loaded with action and example. No unnecessary information; every sentence adds value.

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?

Reasonably complete given no output schema and few parameters. Covers main function, supported keys, app focusing, and combination guidance. Could mention error handling or return values.

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 coverage is 100%, so baseline is 3. Description adds an example and context but does not significantly enhance parameter meaning beyond what the schema already provides.

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 that the tool presses a key combo, provides an example (Cmd+S), and lists supported keys. It distinguishes itself from siblings like batch_actions and type_text.

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

Usage Guidelines5/5

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

Explicitly recommends using batch_actions when combining with other actions and mentions app focusing as a prerequisite, providing clear when-to-use and alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PeterHdd/macos-control-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server