Skip to main content
Glama

send_keys

Send key names or text to a serial device to control interactive programs—interrupt stuck commands with Ctrl-C, navigate menus with arrows/Tab, or send function keys. Useful where plain text input is insufficient.

Instructions

Press keys by name, encoded the way a VT100/xterm terminal sends them.

Use it for what send_text can't type: Ctrl-C to interrupt a running command (ping, monitor, a stuck process), Ctrl-Z, Esc, Tab (completion), arrows (history, menus), Enter alone, function keys, Page Up/Down. Each item is a key name ("ctrl-c", "esc", "tab", "enter", "up", "down", "left", "right", "home", "end", "pgup", "pgdn", "backspace", "delete", "f1".."f12", "space"), a single character, or "text:..." for a literal run. Nothing is read; follow with read_until_prompt, read_available, or screen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes
connectionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool only sends keys and does not read any output ('Nothing is read'), which is a critical behavioral trait. It also hints at the encoding format. While it doesn't mention permissions or rate limits, these are less relevant for a terminal key sender, and the key behavioral aspect (non-reading) is clearly stated.

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?

The description is front-loaded with the core purpose and then provides essential examples and usage details. Every sentence adds value: the encoding note, the use cases, the list of valid key names, and the post-action guidance. It is appropriately sized for a tool with a rich input format, and the structure is logical.

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

Completeness5/5

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

The description is complete for an agent to use the tool correctly. It covers the key input format, the types of keys, the encoding, and the fact that it doesn't read output. It also mentions follow-up actions and distinguishes from send_text. The output schema exists (though not shown) so return values need not be described. The only minor omission is the 'connection' parameter, but it is optional and likely clear from context.

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?

The schema has only a generic array of strings for 'keys', but the description extensively explains the allowed values: key names ('ctrl-c', 'esc', 'tab', etc.), single characters, and 'text:...' for literal runs. This adds significant semantic meaning beyond the schema. The 'connection' parameter is not explained, but it is optional and likely self-explanatory, so the main parameter is well covered.

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 clearly states a specific verb ('Press keys') with a precise resource ('keys by name') and encoding standard ('VT100/xterm terminal'). It explicitly distinguishes itself from send_text by listing what send_text cannot type, which differentiates it from sibling tools like send_text and send_hex.

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?

The description gives explicit when-to-use guidance: 'Use it for what send_text can't type' and provides concrete examples (Ctrl-C, Ctrl-Z, Esc, Tab, arrows, etc.). It also mentions what to do after ('Nothing is read; follow with read_until_prompt, read_available, or screen'), which clarifies the workflow and alternative tools.

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