Skip to main content
Glama
almahdi
by almahdi

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

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe PTY session ID (from pty_spawn)
cleanupNoRemove session and free buffer (default: false)
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/almahdi/mcp-terminal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server