Skip to main content
Glama

Send Keys

send_keys

Send special keys and key sequences to an SSH session to answer prompts, interrupt commands, or navigate terminal interfaces.

Instructions

Send special keys or key sequences to a session.

Supports special key tokens:

  • or : Send newline

  • or : Send escape key

  • : Send tab key

  • : Send Ctrl+C (interrupt)

  • : Send Ctrl+D (EOF)

  • : Send Ctrl+Z (suspend)

  • , , , : Arrow keys

  • : Space character

Regular text is sent as-is. Mix special keys with text: "helloworld"

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

Input Schema

NameRequiredDescriptionDefault
hostYesHostname, IP address, or SSH config alias
keysYesKey sequence to send (e.g., "q<enter>", "<esc>:wq<enter>", "<ctrl-c>")
portNoSSH port (optional)
usernameNoSSH username (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2+p1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It does disclose the token-processing semantics (mixing literal text with special tokens) which is genuine behavioral information, but it says nothing about whether the target session must already exist, whether keystrokes execute shell commands, or how failures are surfaced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded verb statement followed by a scannable token table and a one-line composition rule with an example. Every line carries unique information; nothing is repeated or padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No annotations and no output schema, so the agent gets no safety profile and no return-value contract. The description also omits whether a session must be open first and how this differs from send_input, leaving the key invocation decision under-specified for a tool with meaningful side effects.

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; the description earns an extra point by defining the token grammar for the required 'keys' parameter ('hello<enter>world<ctrl-c>'), meaning an agent can construct valid input without guessing. Connection parameters (host, port, username) are left entirely to the schema.

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 special keys or key sequences to a session.' An agent immediately knows this is keyboard/keystroke injection into an existing session rather than command execution, though it never names a sibling such as send_input or execute_command to disambiguate.

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 implied by the token vocabulary (use this when you need control keys, escape sequences, or TUI navigation) and by 'Regular text is sent as-is', which hints at plain-text alternatives. However there is no explicit when-to-use/when-not statement and no reference to the closely named siblings send_input, send_input_by_session, or execute_command.

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