Skip to main content
Glama

terminal_send_key

Send special keys like Enter, Ctrl-C, Tab, or arrow keys to a terminal session, enabling command submission, interruption, navigation, and control of interactive CLI workflows.

Instructions

Send a special key to the terminal. Supported keys: enter, escape, tab, space, backspace, delete, up, down, left, right, home, end, pageup, pagedown, ctrl-c, ctrl-d, ctrl-z, ctrl-l, ctrl-a, ctrl-e, ctrl-k, ctrl-u, ctrl-w, ctrl-r, ctrl-p, ctrl-n.

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": {
      "session_id": "<session_id>",
      "key": "<key>"
    },
    "name": "terminal_send_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe key to send (e.g., 'enter', 'ctrl-c', 'tab', 'up')
session_idYesThe session ID returned by terminal_spawn

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses little beyond the accepted key names. It does not say what happens on an invalid key or stale session_id, whether the call waits for a response, or whether the key is delivered to the foreground process.

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?

Two sentences with the action stated first and the valid-value set following; the long key list is functional rather than padding. Nothing is wasted, though the list could have been tightened into a schema enum.

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 two-required-parameter tool with no annotations and no output schema, the description covers valid inputs adequately but is silent on failure modes and session state expectations. An agent knows what to send but not what to expect back or how errors surface.

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 would be 3, but the description adds real value by supplying the full set of accepted key values where the schema declares no enum (parameters with enums: 0) and only gives loose examples. That closes a genuine constraint gap the schema leaves open.

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?

States a specific verb and resource ("Send a special key to the terminal") and enumerates exactly what counts as a special key, so an agent can distinguish it from plain text input. It never explicitly names terminal_type as the counterpart for ordinary text, so sibling differentiation is implied rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the enumerated key list tells the agent this is for discrete keystrokes rather than strings. There is no explicit statement of when to prefer this over terminal_type, nor any prerequisite such as the session needing a foreground process.

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