Skip to main content
Glama
almahdi
by almahdi

pty_spawn

Spawn persistent pseudo-terminal sessions to run long-running processes, send interactive commands, and manage multiple concurrent terminal sessions in real-time.

Instructions

Spawns a new PTY (pseudo-terminal) session that runs in the background.

Unlike synchronous bash commands, PTY sessions persist and allow you to:

  • Run long-running processes (dev servers, watch modes, etc.)

  • Send interactive input (including Ctrl+C, arrow keys, etc.)

  • Read output at any time

  • Manage multiple concurrent terminal sessions

Returns the session ID, which you can use with other pty_* tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe command to execute (e.g., 'npm', 'python', 'bash')
argsNoArguments to pass to the command
workdirNoWorking directory (defaults to project root)
envNoAdditional environment variables
titleNoHuman-readable name for the session
descriptionYesClear, concise 5-10 word description of what this command does
notifyOnExitNoReceive notification when process exits (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