Skip to main content
Glama
mcp-interactive-terminal

mcp-interactive-terminal

by hugo94z

terminal_start

Start an interactive shell session and return its ID plus initial screen, enabling AI agents to launch PowerShell, pwsh, CMD, bash or sh and drive persistent consoles.

Instructions

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

Args: shell: "powershell" (Windows PowerShell 5.1), "pwsh" (PowerShell 7), "cmd", "bash" or "sh", or an absolute path to any executable. Defaults to powershell on Windows and bash elsewhere. cwd: Working directory. Defaults to the server's current directory (or MCP_TERMINAL_ROOT when that guardrail is configured). 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, prompt, ready reason and the rendered screen.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "terminal_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNo
envNo
argsNo
colsNo
nameNo
rowsNo
shellNo
replaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.0
    • addedInput schema / properties / shell / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / shell / default
      Previous value: -"powershell"New value: +null
    • removedInput schema / properties / shell / type
      Removed value: -"string"
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: defaults per platform, auto-generated session names (t1, t2), the MCP_TERMINAL_ROOT guardrail for cwd, env merging into the inherited environment, and that 'replace' kills an existing session of the same name. It does not cover what 'ready reason' means, session lifetime, or whether sessions are shared across agents.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence is front-loaded and states purpose plus return value before the Args block. The per-parameter lines are dense and purposeful, though the Returns list is a comma run of field names that reads less cleanly than the rest.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no annotations and no output schema, the description covers parameters thoroughly and enumerates the return fields, so an agent can call it correctly. Gaps remain around session lifetime, concurrency, and the meaning of 'ready reason'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate entirely, and it does: every one of the 8 parameters is explained with defaults, accepted shell values, platform-dependent behavior, and the semantics of 'replace' and 'args'. This is substantially more meaning than the bare schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Start an interactive terminal session') and adds the return payload (id plus initial screen), which is enough to separate it from exec/run style siblings. It stops short of naming any sibling explicitly, so the differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance relative to terminal_exec, terminal_run, or terminal_list. The need to start a session before send/read is only implied by the tool's nature, and nothing warns about when a one-shot exec would be preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.