send_and_read
Send input to an interactive process and read its response in one atomic operation. Control long-running programs by sending commands and immediately receiving output. Supports timeout and line limits.
Instructions
Send input to a process and immediately read its response.
Atomic operation: sends text, waits briefly, then reads new output.
Args: session_id: The session ID returned by start_process. text: Text to send. press_enter: Append newline after text. strip_ansi: Remove ANSI escape codes. Default True. timeout: Seconds to wait for response. Default 5. max_lines: Max lines to return (0 = unlimited).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| text | Yes | ||
| press_enter | No | ||
| strip_ansi | No | ||
| timeout | No | ||
| max_lines | No |