# libtmux_mcp.tools.window_tools.kill_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#L306
- **Page:** https://libtmux.org/en/py/stable/mcp/reference/libtmux_mcp-tools-window_tools-kill_window/

```
libtmux_mcp.tools.window_tools.kill_window(
    window_id: str, socket_name: str | None = None
) -> str
```

Kill (close) a tmux window. Requires exact window_id (e.g. '@3').

Destroys the window and all its panes. Use kill_pane to remove a single
pane instead. Self-kill protection prevents killing the window containing
this MCP process.

## Parameters

- `window_id` (`str`): Window ID (e.g. '@1'). Required — no fallback resolution.
- `socket_name` (`str | None`): tmux socket name.

## Returns

str
    Confirmation message.
