# libtmux_mcp.tools.window_tools.get_window_info

- **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#L111
- **Page:** https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-get_window_info/

```
libtmux_mcp.tools.window_tools.get_window_info(window_id: str | None = None, window_index: str | None = None, session_name: str | None = None, session_id: str | None = None, socket_name: str | None = None) -> WindowInfo
```

Return metadata for a single tmux window (ID, name, layout, dimensions).

Use this instead of list_windows + filter when you only need one
window's info. Resolves the window by window_id first; falls back
to window_index within a session if window_id is not given.

## Parameters

- `window_id` (str | None): Window ID (e.g. '@1').
- `window_index` (str | None): Window index within the session. Requires session_name or
session_id to disambiguate.
- `session_name` (str | None): Session name for window_index lookup.
- `session_id` (str | None): Session ID for window_index lookup.
- `socket_name` (str | None): tmux socket name.

## Returns

WindowInfo
    Serialized window metadata.
