Skip to main content
Glama

press_keys

Send keyboard chords to a GUI session, optionally holding keys down or releasing them, to automate shortcuts, typing, and held-key actions like movement.

Instructions

Press keys in turn, each a chord: Tab, Return, Escape, ctrl+s, alt+shift+Tab, F6. They go to whatever has the keyboard; click a window first with click_element if nothing does. hold presses them all together and keeps them down that long (walking while running); state down leaves them down, across calls, until a call with state up (move or click while a key is held). The answer says what it pressed.

Input Schema

NameRequiredDescriptionDefault
holdNoSeconds to keep it down before letting go
keysYesChords, pressed one after another
stateNoOnly press, leaving it down until a call with up; or only let go
sessionYesIts name, from start_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say readOnly=false / destructive=false, so the description carries the real behavioral load: keys go to whatever has focus, cross-call persistent state ('state down leaves them down, across calls, until a call with state up'), hold duration semantics, and what the response reports. These are stateful side effects an agent cannot infer from the annotations or schema.

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?

Purpose and chord examples are front-loaded, and nearly every clause carries information. It is dense rather than wasteful, though the state clause ('state down leaves them down, across calls, until a call with state up (move or click while a key is held)') is nested enough to require a second read.

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 stateful input tool with no output schema, it covers focus targeting, the three modes (chord list, hold, state), and notes the answer reports what was pressed. It is close to complete, missing only edge behavior such as invalid key names or what happens if no focused window exists.

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 adds interpretive value: it ties 'hold' to a concrete scenario (walking while running) and clarifies that 'state down' persists across calls until an 'up' call. That is meaning beyond the schema's one-line field descriptions.

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 and resource ('Press keys in turn, each a chord') and backs it with concrete chord examples (Tab, ctrl+s, alt+shift+Tab, F6) that immediately separate it from the sibling type_text. An agent can distinguish keystroke injection from text entry without opening the 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?

Gives clear when-to-use context: chords vs. text, and the prerequisite 'click a window first with click_element if nothing does', naming a sibling tool. It also explains when to use hold vs. state (walking while running, move/click while a key is held). It never explicitly states when NOT to use it (e.g., for typing strings use type_text), so it falls short of a 5.

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