Skip to main content
Glama
quantum-encoding

Terminal MCP Server

terminal_spawn

Create named terminal sessions with optional working directory and startup command. Choose interactive, background, or resume modes to control permissions and autonomy for concurrent Claude sessions.

Instructions

Spawn a new named terminal session. Optionally start it in a specific directory and/or run a command immediately.

Use 'mode' to control how Claude sessions run:

  • "interactive" (default): Normal foreground session with permission prompts.

  • "background": Auto-allows safe tools (Bash, Edit, Read, Write, Glob, Grep, Agent) but blocks destructive git commands (force push, reset --hard, branch -D, clean -f) and rm -rf. Best when you want autonomous work with guardrails.

  • "resume": Resume an existing Claude session by name with the same background safety guardrails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory to start in
modeNoSession mode: 'interactive' (default), 'background' (skip permissions), 'resume' (resume existing session)
nameYesName for this terminal (e.g. 'backend', 'tests', 'server')
shellNoShell to use (default: $SHELL)
commandNoCommand to run immediately after spawning (e.g. 'npm run dev')
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It adds meaningful behavioral detail: background mode auto-allows safe tools, blocks destructive git commands and rm -rf, and resume reuses existing sessions. It does not mention duplicate name handling or whether the command blocks, but the disclosed mode behavior is substantial.

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 core sentence is front-loaded, and the mode details are organized into a compact bulleted list. Each section earns its place, though the description is slightly longer than strictly necessary for a spawn operation.

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

Completeness3/5

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

The description is strong on modes and parameter semantics, but gaps remain: it does not explain what happens if the session name already exists, whether the optional command runs asynchronously, or what the tool returns after spawning. With no output schema and no annotations, these are relevant gaps for an agent invoking a creation tool.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by explaining each mode's exact safety behavior and when to use it, especially for 'background' and 'resume'. This pushes parameter semantics above the schema-only baseline.

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 concrete action and resource: 'Spawn a new named terminal session.' It also states optional directory and immediate command execution, which makes the tool's purpose clear. It does not explicitly contrast with sibling tools, but 'new' and 'spawn' make it distinguishable from terminal_send, terminal_read, and terminal_close.

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

Usage Guidelines4/5

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

The description gives explicit mode-selection guidance: 'interactive' is default, 'background' is 'best when you want autonomous work with guardrails', and 'resume' resumes an existing session. It does not discuss when to use this tool versus the other terminal lifecycle tools, but for a spawn action the mode guidance is the key usage decision.

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

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/quantum-encoding/terminal-mcp'

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