send_keys
-
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_batchwhen you need several ordered raw-input operations.For authored shell commands that need completion, exit status, or captured output, use
run_commandinstead. For custom completion outside that shape, composetmux wait-for -S <channel>into the shell command and callwait_for_channel. For repeated observation after input, prefercapture_since; reservewait_for_textfor output the agent does not author.Do NOT call
capture_paneimmediately — both the read and the pattern-match paths race the pane’s PTY draw.- MCP request method
tools/callSendsend_keysas the tool name, with the arguments below.
Arguments#
-
Whether to press Enter after sending keys. Default True.
-
The keys or text to send.
-
Whether to send keys literally (no tmux interpretation). Default False.
-
pane_id? =null(string | null) #Pane ID (e.g. ‘%1’).
-
session_id? =null(string | null) #Session ID (e.g. ‘$1’) for pane resolution.
-
session_name? =null(string | null) #Session name for pane resolution.
-
socket_name? =null(string | null) #tmux socket name.
-
suppress_history? =false(boolean) #Suppress shell history by prepending a space; only effective where the shell ignores space-prefixed commands. Default False.
-
window_id? =null(string | null) #Window ID for pane resolution.
No other arguments are accepted.
Result#
Returns object
Annotations#
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalse
Protocol data#
Use the complete advertised contract for validation and client integration.
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}