Skip to main content
Glama

Press key in terminal

terminal_press
Destructive

Press a named key or key combination (e.g., Enter, Ctrl+C) in a terminal session, optionally repeating it multiple times.

Instructions

Press a single named key or key combination. Examples of supported key values: Enter, Tab, Escape, Backspace, Space, ArrowUp / ArrowDown / ArrowLeft / ArrowRight, Home, End, PageUp, PageDown, Delete, Insert, F1..F12, Ctrl+C, Ctrl+D, Ctrl+L, Ctrl+A..Ctrl+Z, Shift+Tab, Alt+B, Ctrl+ArrowLeft, Ctrl+Shift+ArrowRight, etc. Same settle behavior as terminal_type.

Input Schema

NameRequiredDescriptionDefault
keyYesKey spec like "Enter", "Ctrl+C", "Shift+Tab", "ArrowUp", "F5", "Ctrl+Shift+ArrowLeft".
countNoPress the key this many times in a row (e.g. ArrowUp x 5). Default 1.
idleMsNo
maxWaitMsNo
sessionIdYesNumeric id of the session to target. Get one by calling terminal_create. Use terminal_list to enumerate currently-known ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false, and openWorldHint=true, so the safety profile is covered. The description adds one useful behavioral detail (shared settle behavior with terminal_type), but says nothing about repeat semantics, timing/idle behavior, or failure on unsupported keys.

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 is front-loaded in the first sentence, followed by examples and the settle note. The long example enumeration is justified because there is no enum on `key`, though it is verbose enough to slightly dilute the entry message.

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?

There is no output schema, so return values need not be explained, and annotations cover the safety profile. Still, two of five parameters are undocumented and the meaning of 'settle behavior' is left to the agent to infer, which is a noticeable gap for a mutation tool.

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 60%, and the description substantially expands the `key` vocabulary well beyond the schema's brief examples, adding genuine value. However, idleMs and maxWaitMs remain entirely undocumented in both schema and description, and the `count` behavior is only covered by the schema itself.

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+resource ('Press a single named key or key combination'), which cleanly separates it from sibling terminal_type (text input) and terminal_click (mouse). The extensive example list of supported key values reinforces exactly what kind of input this tool consumes.

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?

The description never states when to choose this over terminal_type or terminal_click, nor any prerequisites such as needing a live session. The 'Same settle behavior as terminal_type' line hints at a relationship but provides no explicit selection guidance or exclusions.

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