libtmux_mcp.tools.window_tools.split_window
Python
- Python
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
-
Split a tmux window to create a new pane.
Creates a new pane by splitting an existing one. Use direction to choose above/below/left/right. Returns the new pane's info including its pane_id.
- Parameters
-
-
pane_id ( str | None ) – Pane ID to split from. If given, splits adjacent to this pane.
-
window_index ( str | None ) – Window index within the session.
-
direction ( t.Literal["above", "below", "left", "right"] | None ) – Split direction.
-
size ( str | int | None ) – Size of the new pane. Use a string with '%%' suffix for percentage (e.g. '50%%') or an integer for lines/columns.
-
start_directory ( str | None ) – Existing directory to start in.
~expands; a relative path resolves against the MCP server process's directory. -
shell ( str | None ) – Shell command to run in the new pane.
-
environment ( dict[str, str] | str | None ) – Per-process environment as a mapping or JSON object string. Values do not modify the tmux session environment. Each item becomes a tmux
-elaunch option. Values may be visible to host process inspection in the tmux client argv during launch and in the child environment afterward; MCP audit redaction does not hide either surface. Pass credential references, not literal credentials. -
suppress_persistent_history ( bool ) – Whether to suppress persistent history for the spawned shell. Defaults to False for MCP and direct Python calls. This per-call option does not inherit LIBTMUX_SUPPRESS_HISTORY. Startup files may override these controls.
-
- Returns
-
PaneInfo Serialized pane object.