send_control
Send control signals (e.g., Ctrl+C, arrow keys) to running commands in local terminals or SSH sessions. Use to interrupt stuck processes or interact with TUI apps like vim or tmux.
Instructions
Send a control key/signal to a running command. Use this whenever a
raw control byte or escape sequence is needed — interrupting a stuck
command OR driving a TUI (zellij, vim, less, htop, etc.). Prefer this
over `respond` for non-printable input: many AI frameworks strip
control characters from MCP string arguments, but the string-keyed
enum here is always safe.
Signal names are case-insensitive. Supported values:
ctrl+a .. ctrl+z 0x01..0x1A (e.g. ctrl+o for zellij detach)
ctrl+\, ctrl+], ctrl+^, ctrl+_, ctrl+[
esc, tab, enter, return, space, backspace, bs
up, down, left, right
home, end, pageup, pagedown, insert, delete, del
backtab / shift+tab
f1 .. f12
alt+<char> ESC + char (bash readline, emacs)
Local non-PTY subprocesses only react to ctrl+c, ctrl+z, ctrl+\
(mapped to SIGINT/SIGTSTP/SIGQUIT). SSH and PTY channels accept all
of the above as raw bytes / escape sequences.
Returns the same format as execute/respond.
Args:
- pause_timeout: seconds of output silence after sending the key
before returning (default 9.0). Raise this if the key is expected
to trigger slow output (e.g. a TUI repaint over high-latency SSH).
- total_timeout: hard cap on call duration (default 20.0). Only binds
while output is actively streaming.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command_id | Yes | The active command_id returned in a partial status response | |
| signal | No | The control signal or key to send. Supported values: 'ctrl+c', 'ctrl+z', 'ctrl+d', arrow keys, enter, f1-f12, etc. | ctrl+c |
| pause_timeout | No | Seconds of output silence to wait before returning (default is 9.0) | |
| total_timeout | No | Hard cap in seconds on the maximum duration of this call (default is 20.0) |