Skip to main content
Glama

Send keys or literal text

send_keys

Sends named tmux keys or literal text to a session without shell interpretation, with optional Enter after text.

Instructions

Send named tmux keys (C-c, Escape, Up, ...) or literal text to a session without shell interpretation. Enter is only pressed for literal text when enter is true. Defaults to the owned session "mcp"; other targets require force: true.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "send_keys"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysNoNamed keys, e.g. ["C-c"]
textNoLiteral text to insert
enterNoPress Enter after literal text
forceNoAllow writing to a foreign, attached, or non-shell target
sessionNoTarget session (default: owned session "mcp")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does notable work: it discloses that input bypasses shell interpretation, that Enter is conditional on enter being true and applies only to literal text, and that foreign/attached/non-shell targets are gated behind force. What is missing is the outcome side — no mention of what is returned or what happens if neither keys nor text is supplied.

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?

Three sentences, each front-loaded with the essential constraint: what can be sent, how Enter behaves, and which session is targeted by default. No redundant restatement of the schema or filler.

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

Completeness4/5

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

For a write tool with no annotations and no output schema, the description covers the safety-relevant gating, the default target, and the enter quirk. The remaining gap is the keys/text interaction and the absence of any statement about return values or failure modes, which matters given that this mutates a live session.

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 100%, so all five parameters are already documented, which sets the baseline at 3. The description does add cross-parameter meaning — tying enter specifically to the literal-text path and explaining that force applies to foreign, attached, or non-shell targets — but it never clarifies whether keys and text can be combined or which takes precedence.

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 concrete verb and resource ('send named tmux keys ... or literal text to a session') with inline examples (C-c, Escape, Up), so an agent knows exactly what arrives at the target. The phrase 'without shell interpretation' implicitly separates it from the exec sibling, though no sibling is named outright.

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?

It gives useful operating context: the default is the owned session 'mcp' and other targets need force: true, which tells the agent when the call will be rejected. It does not say when to prefer exec over this tool or how to handle a mixed keys/text request, so routing guidance is only implied.

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