send_input
Send input to a PTY session and wait for output to stabilize. Optionally match a regex pattern to block until desired output appears, with timeout handling.
Instructions
Send input and wait for output to settle. Returns cursor_start/cursor_end for command boundary tracking, and is_complete (false = timeout, use read_output for remaining output). If wait_for is set, blocks until the pattern matches (combines send_input + read_output wait_for in one call).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | If true, send input exactly as-is without appending a newline. Use for interactive menus and single-character inputs (e.g. menu selections, y/n prompts). Follow with send_control('enter') when ready to submit. | |
| input | Yes | ||
| wait_for | No | Regex pattern to wait for after sending input. Combines send_input + read_output(wait_for=...) into one tool call. | |
| session_id | Yes | ||
| timeout_ms | No | Max wait time in ms (default: 5000, max: 30000) | |
| wait_for_timeout | No | Timeout in seconds for wait_for (default: 10, max: 600) |