# libtmux_mcp.tools.window_tools.split_window

- **Module:** libtmux_mcp.tools.window_tools
- **Package:** libtmux-mcp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/window_tools.py#L155
- **Page:** https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-split_window/

```
libtmux_mcp.tools.window_tools.split_window(pane_id: str | None = None, session_name: str | None = None, session_id: str | None = None, window_id: str | None = None, window_index: str | None = None, direction: t.Literal["above", "below", "left", "right"] | None = None, size: str | int | None = None, start_directory: str | None = None, shell: str | None = None, socket_name: str | None = None, environment: dict[str, str] | str | None = None, suppress_persistent_history: bool = False) -> PaneInfo
```

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.
- `session_name` (str | None): Session name.
- `session_id` (str | None): Session ID (e.g. '$1').
- `window_id` (str | None): Window ID (e.g. '@1').
- `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.
- `socket_name` (str | None): tmux socket name.
- `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
``-e`` launch 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.
