pty_kill
Terminate pseudo-terminal sessions in the PTY MCP Server. Kill running sessions while optionally preserving output buffers for log comparison or removing them entirely to free resources.
Instructions
Terminates a PTY session and optionally cleans up its buffer.
Behavior:
If the session is running, it will be killed (status becomes "killed")
If cleanup=false (default), the session remains in the list with its output buffer intact
If cleanup=true, the session is removed entirely and the buffer is freed
Keeping sessions without cleanup allows you to compare logs between runs
Use cleanup=false if you might want to read the output later. Use cleanup=true when you're done with the session entirely.
To send Ctrl+C instead of killing, use pty_write with data="\x03"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The PTY session ID (from pty_spawn) | |
| cleanup | No | Remove session and free buffer (default: false) |