run_shell_command
-
Run a shell command in a pane with your user’s permissions. Runs one command you author in a pane that is not synchronized with others, rechecks the pane just before sending, and waits for it to finish, reporting its exit status. A tmux command run here acts on the session’s current window unless you target it, so pass
-t "$TMUX_PANE"to mean this pane.- MCP request method
tools/callSendrun_shell_commandas the tool name, with the arguments below.
Arguments#
-
the shell command run in the pane’s interactive shell
-
maximum output lines, keeping the newest
- minimum
0
-
the pane id, such as %1
-
best-effort persistent history suppression
-
seconds to wait before giving up
- minimum
0
No other arguments are accepted.
Result#
Returns object
-
exit_status? (null | integer) # -
lines_missed? (boolean) #
No other properties are accepted.
Annotations#
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalsetitle"Run a shell command"
Protocol data#
Use the complete advertised contract for validation and client integration.
Input schema
{"additionalProperties": false,"properties": {"command": {"description": "the shell command run in the pane's interactive shell","type": "string"},"max_lines": {"description": "maximum output lines, keeping the newest","minimum": 0,"type": "integer"},"pane_id": {"description": "the pane id, such as %1","type": "string"},"suppress_history": {"description": "best-effort persistent history suppression","type": "boolean"},"timeout": {"description": "seconds to wait before giving up","minimum": 0,"type": "number"}},"required": ["pane_id","command"],"type": "object"}Output schema
{"additionalProperties": false,"properties": {"effective_timeout_seconds": {"type": "integer"},"exit_status": {"type": ["null","integer"]},"lines_missed": {"type": "boolean"},"output": {"items": {"type": "string"},"type": ["array"]},"output_unavailable": {"type": "string"},"pane_id": {"type": "string"},"resolved_pane_ids": {"items": {"type": "string"},"type": ["array"]},"running": {"type": "string"},"timed_out": {"type": "boolean"},"timeout_clamped": {"type": "boolean"},"truncated": {"type": "boolean"},"truncated_bytes": {"type": "integer"},"truncated_lines": {"type": "integer"}},"required": ["pane_id","resolved_pane_ids","timed_out","output"],"type": "object"}