Skip to main content
Glama

terminal_spawn

Starts a CLI process in a tmux virtual terminal with a real PTY and returns a session ID, enabling interactive CLI automation and output capture.

Instructions

Start a CLI process in a virtual terminal (tmux session). Returns a session_id for subsequent interactions. The process runs in a real PTY with proper ANSI rendering.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "terminal_spawn"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoEnvironment variables to set (optional)
argsNoCommand arguments (optional)
colsNoTerminal width in columns (default: 120)
rowsNoTerminal height in rows (default: 40)
commandYesThe command to run (e.g., 'bash', 'python3', 'pincer run -- claude')

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 behavioral burden. It does usefully disclose that the process runs in a real PTY inside a tmux session with ANSI rendering, implying persistence and background execution, but it does not say whether the call blocks until exit, what happens on immediate command failure, or whether a spawned session must later be torn down via terminal_close.

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?

Three short sentences, with the core action and return value front-loaded before the PTY detail. The final sentence about ANSI rendering is more reassurance than decision-relevant information, but it costs little.

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 a five-parameter spawn tool with no output schema, the description covers what the tool creates, what it returns (session_id), and the execution environment. The main gap is lifecycle semantics — blocking behavior, failure modes, and cleanup expectations relative to terminal_close.

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

Parameters3/5

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

Schema description coverage is 100%, so command, args, env, cols, and rows are all documented in the schema itself. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

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 states a specific verb and resource ('Start a CLI process in a virtual terminal (tmux session)') and the phrase 'for subsequent interactions' implicitly frames the session_id as the entry point that the other terminal_* tools consume. It is distinguishable from siblings like terminal_type or terminal_close, though it never names them.

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?

It establishes clear context: this is the tool that creates a session and yields a session_id used by later interactions, which orients the agent in the lifecycle. It gives no explicit exclusions or prerequisites (e.g., don't call this if a session already exists), so it stops short of full when/when-not guidance.

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