Skip to main content
Glama

Create an interactive terminal session

terminal_create

Create persistent interactive tmux sessions that survive server restarts for REPLs, SSH, TUI programs, and prompts. Use terminal_write to send input and terminal_read to capture output.

Instructions

Create a persistent interactive shell in tmux. Sessions survive termux-mcp restarts and can run REPLs, SSH, TUI programs and prompts. The shell defaults to $SHELL (Termux bash if unset); when bash is selected, startup files are skipped by default because a custom .bashrc can break Enter handling. Set use_rc=true or terminal.useShellRc in the config to load them. Use terminal_write to type and terminal_read to capture output.

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory. Default $HOME.
envNoExtra environment variables.
colsNoTerminal width. Default 100.
nameNoSession name. Defaults to term-<timestamp>.
rowsNoTerminal height. Default 30.
shellNoShell or executable path. Default $SHELL or Termux bash.
use_rcNoLoad the shell startup files (.bashrc). Default false.
shell_argsNoExtra shell arguments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare the safety profile (not read-only, open-world, non-idempotent, non-destructive); the description adds real behavioral context beyond that: sessions survive termux-mcp restarts, shell defaults to $SHELL/Termux bash, and bash startup files are skipped by default with the reason given. It does not cover what happens if a session name already exists, nor whether the caller must later use terminal_kill to clean up.

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?

Four sentences, front-loaded with purpose, then capabilities, then the shell/rc caveat, then next steps. No filler and no repetition of annotation or schema content.

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, all-optional creation tool with a nested env object and no output schema, the description covers purpose, persistence, and shell behavior well. The one notable omission is what the call returns (presumably the session name/id that terminal_write needs) and the fact that the default term-<timestamp> name makes retrieving that identifier important.

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 coverage is 100%, so baseline is 3; the description earns above baseline by explaining the rationale behind use_rc (a custom .bashrc can break Enter handling) and the config-level override terminal.useShellRc, which adds meaning the one-line schema description does not convey. It does not touch cwd, env, cols, rows, or shell_args, but those are already documented in the schema.

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 ('Create a persistent interactive shell in tmux') and immediately scopes it to REPLs, SSH, TUI programs and prompts, which separates it from one-shot command execution siblings like run_command. It also names terminal_write and terminal_read as the follow-on tools, so the agent can place this tool in the workflow without opening a schema.

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?

Gives clear when-to-use context (persistent shell, REPLs, SSH, TUI) and explicitly routes to terminal_write/terminal_read for subsequent interaction. It does not explicitly say when NOT to use this versus run_command (e.g., for one-off commands), which is the main remaining gap.

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