Send keys (commands or text) to a tmux pane.
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.
All Python tools · JSON · Source
Arguments
enteroptional · boolean- Whether to press Enter after sending keys. Default True.
Default:
true. keysrequired · string- The keys or text to send.
literaloptional · boolean- Whether to send keys literally (no tmux interpretation). Default False.
Default:
false. pane_idoptional- Pane ID (e.g. '%1').
Default:
null. session_idoptional- Session ID (e.g. '$1') for pane resolution.
Default:
null. session_nameoptional- Session name for pane resolution.
Default:
null. socket_nameoptional- tmux socket name.
Default:
null. suppress_historyoptional · boolean- Suppress shell history by prepending a space; only effective where
the shell ignores space-prefixed commands. Default False.
Default:
false. window_idoptional- Window ID for pane resolution.
Default:
null.
Schemas
The schema defines required fields, nested values, defaults, and validation constraints.
Input schema
{ "additionalProperties": false, "properties": { "enter": { "default": true, "description": "Whether to press Enter after sending keys. Default True.", "type": "boolean" }, "keys": { "description": "The keys or text to send.", "type": "string" }, "literal": { "default": false, "description": "Whether to send keys literally (no tmux interpretation). Default False.", "type": "boolean" }, "pane_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Pane ID (e.g. '%1')." }, "session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Session ID (e.g. '$1') for pane resolution." }, "session_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Session name for pane resolution." }, "socket_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "tmux socket name." }, "suppress_history": { "default": false, "description": "Suppress shell history by prepending a space; only effective where\nthe shell ignores space-prefixed commands. Default False.", "type": "boolean" }, "window_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Window ID for pane resolution." } }, "required": [ "keys" ], "type": "object"}Output schema
{ "properties": { "result": { "type": "string" } }, "required": [ "result" ], "type": "object", "x-fastmcp-wrap-result": true}Tool annotations
{ "destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}