Skip to main content
Glama

send_keys

Send commands or key sequences to a tmux pane and capture the output. Supports raw key sequences like C-c or arrow keys when used with enter=false.

Instructions

Send keys or a command to a tmux pane, then capture its output. Target format: 'session:window.pane'. Use enter=false for raw tmux key sequences like 'C-c', 'Escape', or arrow keys — these are not shell commands and must not have Enter appended. Use enter=true (default) for shell commands. Set wait_ms higher for long-running commands; 0 captures immediately before output appears. WARNING: this executes arbitrary commands in your shell — only use with trusted input.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYesCommand or key sequence (tmux notation: 'C-c', 'Escape', 'Up', etc.)
enterNoPress Enter after keys (default: true). Set false for raw key sequences like C-c, Escape, arrow keys.
targetYesPane target: 'session:window.pane'
wait_msNoMilliseconds to wait before capturing (default: 400). Set higher for slow commands, 0 to capture immediately.
capture_linesNoLines to capture after sending (default: 50)
Behavior4/5

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

No annotations provided, so description carries full burden. It warns about executing arbitrary commands ('only use with trusted input') and explains behavior of enter and wait_ms. Lacks details on rate limits or side effects, but safety warning adds significant transparency.

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?

Description is three sentences with a warning, front-loaded with core purpose. Every sentence adds value: first defines action, second details enter flag, third advises wait_ms and includes warning. No redundancy.

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?

Covers all 5 parameters with clear guidance. No output schema but mentions capturing output. Includes safety warning appropriate for a command execution tool. Complete for the complexity level.

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 baseline is 3. Description adds meaning beyond schema: explains target format, clarifies enter flag usage, and gives context for wait_ms behavior. No param descriptions are missing.

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 the tool sends keys or commands to a tmux pane and captures output, with specific target format 'session:window.pane'. It distinguishes from siblings like capture_pane by combining send and capture.

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

Usage Guidelines4/5

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

Provides explicit guidance on when to use enter=false for raw key sequences vs enter=true for commands, and recommends adjusting wait_ms for long-running commands. Does not explicitly compare to sibling tools like capture_pane, but usage context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fr1sk/tmux-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server