pty_write
Send input to active terminal sessions, including commands, text, and control sequences like Ctrl+C or arrow keys, for interacting with command-line programs.
Instructions
Sends input data to an active PTY session.
Use this tool to:
Type commands or text into an interactive terminal
Send special key sequences (Ctrl+C, Enter, arrow keys, etc.)
Respond to prompts in interactive programs
Common escape sequences:
Enter/newline: "\n" or "\r"
Ctrl+C (interrupt): "\x03"
Ctrl+D (EOF): "\x04"
Ctrl+Z (suspend): "\x1a"
Tab: "\t"
Arrow Up: "\x1b[A"
Arrow Down: "\x1b[B"
Arrow Right: "\x1b[C"
Arrow Left: "\x1b[D"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The PTY session ID (from pty_spawn) | |
| data | Yes | Input string to send (supports escape sequences) |