Skip to main content
Glama
tmux-mcp-tools

tmux-mcp-tools

by PsychArch

Tmux Send Command

tmux_send_command

Executes commands in a target tmux pane with automatic Enter and optional regex waiting, helping detect shell or program prompts so you know when to proceed or send input.

Instructions

Execute commands with automatic Enter.

CRITICAL: Use wait_for_pattern or analyze the last line of output:

  • Shell prompt (pattern like r'user@host.*$') → command completed, safe to proceed

  • Program prompt ((gdb) >>> mysql>) → interactive mode, send input as needed

  • No prompt / progress indicators → still executing, wait or check with tmux_capture_pane

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": {
      "commands": "<commands>",
      "target_pane": "<target_pane>"
    },
    "name": "tmux_send_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
delayNoTimeout in seconds (max 600).
commandsYesCommands to send
target_paneYes
wait_for_patternNoRegex to wait for in the terminal outputs. Polls until match or timeout.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

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 full behavioral burden and does disclose the important traits: Enter is appended automatically, waiting is pattern-based with a timeout, and how to distinguish still-running from completed. It does not say what happens when the timeout expires (error vs. partial result) or whether commands run sequentially, which matters for a mutation-capable tool.

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?

Front-loads the one-line purpose, then a compact three-branch decision list; no filler sentences. The all-caps 'CRITICAL' and mixed prose/bullet formatting are slightly noisy but the content earns its space.

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?

An output schema exists, so return values need not be described, and the core invocation flow is covered. However, for a command-execution tool with zero annotations, the definition omits side-effect/permission context and timeout-failure behavior, leaving gaps an agent would want before sending arbitrary commands.

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 75% and already documents delay as a timeout and wait_for_pattern as a polling regex; the description reinforces the wait semantics but adds no new format or constraint detail. The undocumented target_pane parameter is never explained in the description either, so it does not compensate for the coverage gap.

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: executes commands in a tmux pane, appending an automatic Enter. An agent can tell this apart from tmux_send_keys (raw keystrokes) by the 'automatic Enter' detail, though no sibling is named explicitly.

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?

Gives actionable post-execution guidance: use wait_for_pattern or inspect the last output line, with three concrete branches (shell prompt, program prompt, no prompt) and a fallback to tmux_capture_pane. It does not say when to prefer this over tmux_send_keys, so the choice between the two send tools is left implicit.

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