send_command
Execute commands in an active SSH session and capture the terminal output, automatically waiting for completion.
Instructions
Send a command to an active session and return the screen snapshot.
This tool automatically polls waiting for the command to complete. The response includes [INFO: ...] hints about detected prompts or interactive input requests.
For long-running commands (builds, downloads, etc.), use get_snapshot() to check progress periodically. Do NOT close the session while processes are running - they will be terminated.
Args: session_id: The ID of the session (format: user@host-). command: The command to send. lines: Number of lines to capture from the end of the screen and tmux scrollback (default 40). timeout: Max seconds to poll for command completion (default 2.0). Increase for slower commands like package installs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | ||
| command | Yes | ||
| timeout | No | ||
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |