Split window

split_window

split_window
mutating tool

Split a tmux window to create a new pane.

Returns:

PaneInfo

Use when you need side-by-side or stacked terminals within the same window.

Side effects: Creates a new pane by splitting an existing one.

Example:

{
  "tool": "split_window",
  "arguments": {
    "session_name": "dev",
    "direction": "right"
  }
}

Response:

{
  "pane_id": "%4",
  "pane_index": "1",
  "pane_width": "39",
  "pane_height": "24",
  "pane_current_command": "zsh",
  "pane_current_path": "/home/user/myproject",
  "pane_pid": "3732",
  "pane_title": "",
  "pane_active": "0",
  "window_id": "@0",
  "session_id": "$0",
  "is_caller": false
}

Parameters

Parameter

Type

Required

Default

Description

pane_id

str

no

Pane ID to split from. If given, splits adjacent to this pane.

session_name

str

no

Session name.

session_id

str

no

Session ID (e.g. ‘$1’).

window_id

str

no

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

window_index

str

no

Window index within the session.

direction

enum

no

Split direction. One of: 'above', 'below', 'left', 'right'.

size

str | int

no

Size of the new pane. Use a string with ‘%%’ suffix for percentage (e.g. ‘50%%’) or an integer for lines/columns.

start_directory

str

no

Working directory for the new pane.

shell

str

no

Shell command to run in the new pane.

socket_name

str

no

tmux socket name.