Skip to main content
Glama
computer
by zznabil

Press keys

press_keys
Destructive

Send key chords like Ctrl+S or Enter to a target window, using background input by default or taking over for real keyboard actions.

Instructions

Press a key chord in the target window.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": "<target>",
      "keys": "<keys>"
    },
    "name": "press_keys"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysYesKey chord, e.g. "ctrl+s", "enter", "ctrl+shift+p", or ["ctrl","s"].
targetYesWindow id from list_windows, "desktop", or "display:<id>" / "display:active" / "display:all". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard.
takeoverNoOmit (default): background first; the server decides any takeover. true: activate the window and post real input now. false: background only, never take over.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, openWorldHint=true, idempotentHint=false, and readOnlyHint=false, so the agent knows this is a risky input-injection operation. The description adds only the window-targeting scope; it does not explain what 'destructive' means here or warn about takeover side effects, though the schema partially covers takeover behavior.

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 description is a single front-loaded sentence with no wasted wording. It is concise, though its brevity contributes to gaps in guidance rather than being a structural flaw.

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 simple three-parameter tool with a rich schema and strong annotations, the description is minimally sufficient to call the tool correctly. However, it omits sibling differentiation and does not clarify the real-input consequences of target or takeover choices beyond what the schema already says.

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 description coverage is 100%, so the schema already fully documents key chord formats, target values, and takeover semantics. The description adds no parameter meaning beyond mentioning 'target window,' making the baseline 3 appropriate.

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 uses a specific verb and resource ('Press a key chord') and scopes it to 'the target window,' so the agent can tell this is a keyboard-input tool. It does not distinguish itself from siblings such as element_press_keys or type_text, leaving ambiguity about which keyboard tool to choose.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no named alternatives. The description implies sending keyboard shortcuts to a window but does not explain when to prefer this over element_press_keys, element_press, or type_text.

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