Skip to main content
Glama
hugo94z

mcp-interactive-terminal

by hugo94z

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
terminal_startA

Start an interactive terminal session and return its id plus the initial screen.

Args: shell: "powershell" (Windows PowerShell 5.1), "pwsh" (PowerShell 7), "cmd", or an absolute path to any executable. cwd: Working directory. Defaults to the server's current directory. env: Extra environment variables merged into the inherited environment. cols: Terminal width in columns (default 120). rows: Terminal height in rows (default 30). name: Session id. Auto-generated (t1, t2, ...) when omitted. replace: Kill an existing session with the same name and start a fresh one. args: Extra arguments passed to the shell or executable.

Returns: session_id, shell, cwd, pid, size, ready reason and the rendered screen.

terminal_sendA

Send text and/or named keys to a session.

Args: session_id: Session returned by terminal_start. text: Literal text to type (not followed by Enter unless enter=true). keys: Named keys, e.g. ["ctrl-c"], ["up"], ["tab"], ["f5"], ["text:abc"]. Supported: enter, tab, backtab, esc, space, backspace, up, down, left, right, home, end, pageup, pagedown, insert, delete, f1..f12, ctrl-a..ctrl-z, ctrl-space, ctrl-break. enter: Append a carriage return after text/keys. repeat: Repeat the whole sequence 1..100 times.

Returns: session_id, sent_chars and running state.

terminal_readA

Read incremental raw output from a session, without duplicates.

Each call returns only what arrived after the previous read. Use the returned cursor with since to resume from an explicit position.

Args: session_id: Session returned by terminal_start. since: Absolute character offset to read from. Defaults to the last read position. max_chars: Maximum characters returned (head+tail with an explicit omission marker). grep: Keep only lines matching this regular expression. tail: Keep only the last N lines (applied after grep). strip_ansi: Remove ANSI escape sequences.

Returns: text, cursor (pass as since), dropped, truncated, running, exit_code.

Note: PowerShell (PSReadLine) repaints the current line with cursor movements, so raw output contains fragments. Use terminal_screen for an authoritative view.

terminal_waitA

Block until output matches a regex, becomes quiet, the session exits, or timeout.

Args: session_id: Session returned by terminal_start. until: Case-insensitive regular expression to wait for, e.g. "PS C:\|>>>|Done". quiet_ms: Return when no output arrived for this long (0 disables quiet detection). Provide at least one of until or quiet_ms. timeout_ms: Give up after this long. ignore_echo: Ignore the echo of the last command line when matching until (prevents matching the command text itself).

Returns: reason: "matched" | "quiet" | "exited" | "timeout", matched, running, exit_code, and the rendered screen.

terminal_screenA

Return the rendered terminal screen (VT emulation) with cursor position.

This is the clean view: cursor moves, erases and color codes are applied, so it shows exactly what a human would see, including the current prompt or TUI.

Args: session_id: Session returned by terminal_start. max_chars: Maximum characters returned (head+tail with an omission marker).

Returns: text, cursor {x,y}, cols, rows, running, exit_code.

terminal_interruptA

Stop the command running in a session, keeping the shell alive.

Sends Ctrl+C first. Native Windows programs often ignore the control character inside a pseudo-console, so any child process still running after a short grace period is terminated together with its own children. The shell itself is preserved.

Args: session_id: Session returned by terminal_start. force: Skip the grace period and terminate child processes immediately.

Returns: session_id, sent, running and the list of terminated pids.

terminal_resizeA

Resize the pseudo-terminal (affects wrapping and full-screen programs).

Args: session_id: Session returned by terminal_start. cols: New width, 2..1000. rows: New height, 2..500.

terminal_listB

List active sessions with their state, pid, cwd, size, idle time and buffer size.

terminal_stopB

Close a session and free its process.

Args: session_id: Session returned by terminal_start. force: Kill the whole process tree instead of requesting a graceful stop.

terminal_execA

Run a one-shot command to completion and return its output and exit code.

Use this for non-interactive commands. Use terminal_start + terminal_send for programs that need input, a TUI, or a persistent shell.

Args: command: Command line to execute. shell: "powershell", "pwsh" or "cmd". cwd: Working directory. Defaults to the server's current directory. env: Extra environment variables. timeout_ms: Kill the command after this long. max_chars: Maximum output characters returned.

Returns: output, exit_code, timed_out, duration_ms, truncated.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 10 tools

Disambiguation5/5

Each tool has a clearly distinct role: lifecycle (start/stop/list/resize), input (send/interrupt), and output (read/screen/wait/exec). The potentially overlapping read vs. screen and wait vs. read pairs are explicitly differentiated in their descriptions (raw incremental vs. rendered VT view; blocking vs. immediate).

Naming Consistency5/5

Every tool follows the same terminal_<verb> snake_case pattern with no exceptions. The verb choices are predictable and consistent across the set.

Tool Count5/5

Ten tools is well-scoped for interactive terminal control, with each one covering a necessary operation (lifecycle, input, output, waiting, rendering). No redundant or filler tools.

Completeness4/5

The surface covers the full interactive lifecycle: start/stop, send/interrupt, read/screen/wait, resize, plus a one-shot exec for non-interactive commands. Minor gaps exist, such as no session rename or explicit scrollback/buffer clearing, but core workflows are fully covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues