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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"text": "<text>"
},
"name": "send_and_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| text | Yes | ||
| press_enter | No | ||
| strip_ansi | No | ||
| timeout | No | ||
| max_lines | No |