Move window

move_window

move_window
mutating tool

Move a window to a different index or session.

Returns:

WindowInfo

Use when you need to reorder windows within a session or move a window to a different session entirely.

Side effects: Changes the window’s index or parent session.

Example:

{
  "tool": "move_window",
  "arguments": {
    "window_id": "@1",
    "destination_index": "1"
  }
}

Response:

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

Parameters

Parameter

Type

Required

Default

Description

window_id

str

no

Window ID (e.g. ‘@1’).

window_index

str

no

Window index within the session.

session_name

str

no

Source session name.

session_id

str

no

Source session ID.

destination_index

str

no

''

Target window index. Default empty string (next available).

destination_session

str

no

Target session name or ID. Default is current session.

socket_name

str

no

tmux socket name.

Destroy