Windows¶
Inspect readonly¶
list_windows readonly¶
List windows in a tmux session, or all windows across sessions.
Returns: list[WindowInfo]
Use when you need window names, indices, or layout metadata within a session before selecting a window to work with.
Avoid when you need pane-level detail — use list_panes readonly.
Side effects: None. Readonly.
Example:
{
"tool": "list_windows",
"arguments": {
"session_name": "dev"
}
}
Response:
[
{
"window_id": "@0",
"window_name": "editor",
"window_index": "1",
"session_id": "$0",
"session_name": "dev",
"pane_count": 2,
"window_layout": "c195,80x24,0,0[80x12,0,0,0,80x11,0,13,1]",
"window_active": "1",
"window_width": "80",
"window_height": "24"
},
{
"window_id": "@1",
"window_name": "server",
"window_index": "2",
"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 |
|---|---|---|---|---|
|
|
no |
— |
Session name to look up. If omitted along with session_id, returns windows from all sessions. |
|
|
no |
— |
Session ID (e.g. ‘$1’) to look up. |
|
|
no |
— |
tmux socket name. Defaults to LIBTMUX_SOCKET env var. |
|
|
no |
— |
Django-style filters as a dict (e.g. |
list_panes readonly¶
List panes in a tmux window, session, or across the entire server.
Returns: list[PaneInfo]
Use when you need to discover which panes exist in a window before sending keys or capturing output.
Side effects: None. Readonly.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
— |
Session name. If given without window params, lists all panes in the session. |
|
|
no |
— |
Session ID. If given without window params, lists all panes in the session. |
|
|
no |
— |
Window ID (e.g. ‘@1’). Scopes to a single window. |
|
|
no |
— |
Window index within the session. Scopes to a single window. |
|
|
no |
— |
tmux socket name. |
|
|
no |
— |
Django-style filters as a dict (e.g. |
Act mutating¶
create_window mutating¶
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 |
|---|---|---|---|---|
|
|
no |
— |
Session name to look up. |
|
|
no |
— |
Session ID (e.g. ‘$1’) to look up. |
|
|
no |
— |
Name for the new window. |
|
|
no |
— |
Working directory for the new window. |
|
|
no |
|
Whether to make the new window active. |
|
|
no |
— |
Window placement direction. One of: |
|
|
no |
— |
tmux socket name. Defaults to LIBTMUX_SOCKET env var. |
split_window mutating¶
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": null
}
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
— |
Pane ID to split from. If given, splits adjacent to this pane. |
|
|
no |
— |
Session name. |
|
|
no |
— |
Session ID (e.g. ‘$1’). |
|
|
no |
— |
Window ID (e.g. ‘@1’). |
|
|
no |
— |
Window index within the session. |
|
|
no |
— |
Split direction. One of: |
|
|
no |
— |
Size of the new pane. Use a string with ‘%%’ suffix for percentage (e.g. ‘50%%’) or an integer for lines/columns. |
|
|
no |
— |
Working directory for the new pane. |
|
|
no |
— |
Shell command to run in the new pane. |
|
|
no |
— |
tmux socket name. |
rename_window mutating¶
Rename a tmux window.
Returns: WindowInfo
Use when a window name no longer reflects its purpose.
Side effects: Renames the window.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
— |
The new name for the window. |
|
|
no |
— |
Window ID (e.g. ‘@1’). |
|
|
no |
— |
Window index within the session. |
|
|
no |
— |
Session name. |
|
|
no |
— |
Session ID. |
|
|
no |
— |
tmux socket name. |
select_layout mutating¶
Set the layout of a tmux window.
Returns: WindowInfo
Use when you want to rearrange panes — even-horizontal,
even-vertical, main-horizontal, main-vertical, or tiled.
Side effects: Rearranges all panes in the window.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
— |
Layout name or custom layout string. Built-in layouts: ‘even-horizontal’, ‘even-vertical’, ‘main-horizontal’, ‘main-horizontal-mirrored’, ‘main-vertical’, ‘main-vertical-mirrored’, ‘tiled’. |
|
|
no |
— |
Window ID (e.g. ‘@1’). |
|
|
no |
— |
Window index within the session. |
|
|
no |
— |
Session name. |
|
|
no |
— |
Session ID. |
|
|
no |
— |
tmux socket name. |
resize_window mutating¶
Resize a tmux window.
Returns: WindowInfo
Use when you need to adjust the window dimensions.
Side effects: Changes window size.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
— |
Window ID (e.g. ‘@1’). |
|
|
no |
— |
Window index within the session. |
|
|
no |
— |
Session name. |
|
|
no |
— |
Session ID. |
|
|
no |
— |
New height in lines. |
|
|
no |
— |
New width in columns. |
|
|
no |
— |
tmux socket name. |
Destroy destructive¶
kill_window destructive¶
Kill (close) a tmux window. Requires exact window_id (e.g. ‘@3’).
Returns: str
Use when you’re done with a window and all its panes.
Avoid when you only want to remove one pane — use kill_pane destructive.
Side effects: Destroys the window and all its panes. Not reversible.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
— |
Window ID (e.g. ‘@1’). Required — no fallback resolution. |
|
|
no |
— |
tmux socket name. |