Skip to main content
Glama

Open a terminal session

terminal_spawn

Opens a persistent local shell session that preserves its working directory and environment between commands, returning a session id for follow-up terminal operations.

Instructions

Open a new persistent local shell session. The session keeps its working directory and environment between commands. Returns the session id used by the other terminal tools.

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_spawn"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory for the session. Defaults to the directory where the server started.
envNoExtra environment variables merged into the inherited environment.
nameNoFriendly name for the session. Must be unique enough to use instead of the id.
shellNoShell executable to start, for example /bin/zsh, /bin/bash or cmd.exe. Defaults to $SHELL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive, open-world behavior, so the description needn't repeat safety. It adds genuinely useful context beyond them — that the session is persistent and retains working directory and environment across commands, which is the key trait an agent needs to reason about state.

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

Conciseness5/5

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

Three short sentences with zero filler: what it does, how it behaves across calls, and what it returns. The most decision-relevant facts are front-loaded.

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

Completeness5/5

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

For a four-optional-parameter session-creation tool with no output schema, the description covers purpose, persistence semantics, and the return value. Combined with full schema coverage and annotations carrying the safety profile, nothing essential is missing.

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 coverage is 100%, so cwd, env, name and shell are already fully documented in the schema. The description adds no parameter detail (e.g., how name and id interact as handles, or env inheritance nuances), so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource ('Open a new persistent local shell session') and distinguishes itself from the exec/read/write/close siblings by declaring it returns the session id those tools consume. An agent knows immediately this is the creation tool in the family.

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 sentence 'Returns the session id used by the other terminal tools' makes the ordering dependency clear: spawn first, then use exec/read/write. There is no explicit when-not guidance or mention of a session cap, but the usage context is unambiguous.

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