Skip to main content
Glama

Press keys

press_keys

Sends keyboard keys or shortcuts to an app, can run multiple key combinations in order, and optionally returns a screenshot to verify the result.

Instructions

Press a key or shortcut (not for browser navigation: use browser_open/browser_navigate), e.g. "enter", "cmd+s", "cmd+shift+p", "tab", "esc", "down". Several separated by spaces run in order: "cmd+a delete".

Input Schema

NameRequiredDescriptionDefault
appNoApp to send the keys to (brought to the front first); default: the app you last worked in
keysYes
look_afterNoReturn a fresh screenshot of the front window after the action, to check the result

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.1

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses execution semantics — space-separated keys run in order, so 'cmd+a delete' is a sequence rather than a literal string — which is behavior the schema does not express. However it says nothing about focus/permission requirements, failure behavior, or side effects, so the disclosure is partial.

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?

The exclusion is front-loaded in the parenthetical before the examples, and the two-sentence structure is dense with no filler. It is slightly awkward in flow (the routing caveat interrupts the definition), but every clause earns its place by adding either scope or syntax.

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 three-parameter action tool with no annotations and no output schema, the definition covers purpose, syntax, sequencing, and an explicit routing exclusion — enough for correct invocation. It does not mention what happens to non-frontmost apps or error cases, but the schema's 'app' and 'look_after' descriptions cover the surrounding context.

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 67%, and the undocumented parameter is the required 'keys'. The description compensates directly by giving valid string formats and examples of both single keys and space-separated sequences, which is meaningfully more than the bare 'string' type in the schema. The other two parameters are already fully documented in the schema, so no further description is needed there.

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?

States a specific verb (press) and resource (key or shortcut) and immediately distinguishes it from the sibling browser-related tools. The inline examples ('enter', 'cmd+s', 'cmd+shift+p', 'tab', 'esc', 'down') make the scope of 'keys' concrete enough that an agent can tell this apart from type_text or browser_navigate without opening any schema.

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?

Provides an explicit when-not rule with named alternatives ('not for browser navigation: use browser_open/browser_navigate'), which is exactly the kind of routing guidance that prevents misfires. It stops short of a full 5 because it doesn't clarify the boundary against text-entry siblings like type_text or click, so some ambiguity remains for non-navigation use cases.

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