Create window

create_window

create_window
mutating tool

Create a new window in a tmux session.

Returns:

WindowInfo

Use when you need a new terminal workspace within an existing session.

Side effects: Creates a new window. Attaches to it if attach is true.

Example:

{
  "tool": "create_window",
  "arguments": {
    "session_name": "dev",
    "window_name": "logs"
  }
}

Response:

{
  "window_id": "@2",
  "window_name": "logs",
  "window_index": "3",
  "session_id": "$0",
  "session_name": "dev",
  "pane_count": 1,
  "window_layout": "b25f,80x24,0,0,5",
  "window_active": "1",
  "window_width": "80",
  "window_height": "24"
}

Parameters

Parameter

Type

Required

Default

Description

session_name

str

no

Session name to look up.

session_id

str

no

Session ID (e.g. ‘$1’) to look up.

window_name

str

no

Name for the new window.

start_directory

str

no

Working directory for the new window.

attach

bool

no

False

Whether to make the new window active.

direction

enum

no

Window placement direction. One of: 'before', 'after'.

socket_name

str

no

tmux socket name. Defaults to LIBTMUX_SOCKET env var.