MCPpre-alphaAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

libtmux_mcp.tools.pane_tools.send_keys

libtmux_mcp.tools.pane_tools.send_keys ( keys: str, pane_id: str | None = None, session_name: str | None = None, session_id: str | None = None, window_id: str | None = None, enter: bool = True, literal: bool = False, suppress_history: bool = False, socket_name: str | None = None, ) → str

Send keys (commands or text) to a tmux pane.

Description#

Use this for raw interactive input: TUI keys, control sequences, partial shell input, or persistent shell state. Use send_keys_batch when you need several ordered raw-input operations.

For authored shell commands that need completion, exit status, or captured output, use run_command instead. For custom completion outside that shape, compose tmux wait-for -S <channel> into the shell command and call wait_for_channel. For repeated observation after input, prefer capture_since; reserve wait_for_text for output the agent does not author.

Do NOT call capture_pane immediately — both the read and the pattern-match paths race the pane's PTY draw.

Parameters
Returns

str Confirmation message.

Esc

Type to search.

Reference preview Open reference