Skip to main content
Glama

press_keys

Send key sequences to an agent's terminal tab to approve or deny prompts, navigate menus, or answer trust dialogs. Use after capturing the screen when typed messages are not suitable.

Instructions

Press keys in the agent's tab, e.g. ["Enter"], ["Escape"], ["Down", "Enter"], ["ctrl+c"].

Read the screen with capture_screen first: approving a prompt lets the agent run that command. omp approvals: ["ctrl+Enter"] approves, ["Escape"] denies. Claude Code asks once per repository whether to trust the folder: ["Down", "Enter"] answers "Yes, I trust this folder". Prefer send_message for text.

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": {
      "name": "<name>",
      "keys": "<keys>"
    },
    "name": "press_keys"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysYes
nameYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose the important side effect: approving a prompt lets the agent run that command. It also documents environment-specific interactive behavior for omp and Claude Code trust prompts. It stops short of saying whether keystrokes go to a named session/tab, whether the call blocks or waits, or what happens if the target is not focused.

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?

It is dense and front-loaded: the core action and examples come first, then prerequisites, then the alternative tool. The approval-flow detail is long but earns its place as operative guidance; minor cost from the tersely-worded "omp approvals" line, which reads as shorthand an unfamiliar agent must infer.

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?

An output schema exists, so return values need not be explained, and the interactive-use context is unusually well covered. However, with 0% schema coverage on two required parameters, leaving `name` undefined is a real completeness gap, along with no word on focus/timing behavior or failure modes for a tool that sends input into a live session.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for both parameters. It does a good job illustrating the `keys` array format with bracketed examples, but the `name` parameter is never mentioned at all — an agent cannot tell from the definition whether it names a session, a tab, or an agent identity.

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 opens with a specific verb and resource ("Press keys in the agent's tab") and immediately grounds it in concrete key-sequence examples. It also explicitly separates this tool's domain from send_message, so an agent can pick between them without opening either schema.

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?

It gives a concrete precondition ("Read the screen with capture_screen first") and a concrete exclusion ("Prefer send_message for text"). It goes further by naming the exact key sequences needed for real approval flows in two named agent environments, which is exactly the guidance an agent needs before acting.

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