# libtmux_mcp.tools.window_tools.list_panes

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

```
libtmux_mcp.tools.window_tools.list_panes(session_name: str | None = None, session_id: str | None = None, window_id: str | None = None, window_index: str | None = None, socket_name: str | None = None, filters: dict[str, str] | str | None = None) -> list[PaneInfo]
```

List tmux panes (terminal multiplexer splits) in a window, session, or server.

Use for terminal panes — including 'this pane', 'current pane',
'split pane', 'the bottom shell' — not editor splits or browser panes.
Only searches pane metadata (current command, title, working directory);
to search the actual visible terminal text, use search_panes.

## Parameters

- `session_name` (str | None): Session name. If given without window params, lists all panes
in the session.
- `session_id` (str | None): Session ID. If given without window params, lists all panes
in the session.
- `window_id` (str | None): Window ID (e.g. '@1'). Scopes to a single window.
- `window_index` (str | None): Window index within the session. Scopes to a single window.
- `socket_name` (str | None): tmux socket name.
- `filters` (dict[str, str] | str | None): Django-style filters as a dict
(e.g. ``{"pane_current_command__contains": "vim"}``)
or as a JSON string. Some MCP clients require the string form.

## Returns

list[PaneInfo]
    List of serialized pane objects.
