Skip to main content
Glama
laszlopere

mcp-tmux

by laszlopere

tmux_new_session

Create a new tmux session in detached mode. Optionally specify command, directory, size, environment variables, or reuse an existing session by name.

Instructions

Create a new session (detached by default).

Optional command runs as the first pane's command; start_directory sets the working dir; width/height size the detached session. attach_or_create=True makes the call idempotent: if a session named name already exists it is reused (its id/name returned) instead of erroring, otherwise it is created. tmux's own new-session -A attaches the existing session, which a headless MCP server has no terminal to do; so the reuse here is a detached has-session check (the create-time options below only apply when the session is actually created). env (-e KEY=VAL, tmux 3.0+) sets session environment variables before the first command launches; ignored with a note on older tmux. Returns the created (or existing) session's {"id", "name"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
start_directoryNo
commandNo
widthNo
heightNo
detachedNo
attach_or_createNo
envNo
targetNo
Behavior5/5

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

With no annotations, the description carries full burden. It discloses detached default, `attach_or_create` reuse logic, `env` version dependency, and return format. No contradictions.

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 description is moderately long but front-loaded with core purpose. Each sentence adds value, though some rephrasing could tighten it slightly.

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?

Given no output schema and no annotations, the description thoroughly covers behavior, side effects, version constraints, and return values. It is complete for an agent to invoke correctly.

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 has 0% description coverage for 9 parameters. The description adds meaningful details for all key parameters: `command`, `start_directory`, `width`, `height`, `attach_or_create`, `env`, and return values.

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?

The description clearly states the tool creates a new tmux session, detached by default. It distinguishes from siblings like `tmux_has_session` and `tmux_new_window` by detailing the `attach_or_create` idempotency feature.

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 explains when to use `attach_or_create=True` and contrasts with tmux's `new-session -A`. It provides context for detached operation but does not explicitly list when not to use the tool.

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/laszlopere/mcp-tmux'

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