MCPpre-alphaAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

libtmux_mcp.tools.session_tools.list_windows

libtmux_mcp.tools.session_tools.list_windows ( session_name: str | None = None, session_id: str | None = None, socket_name: str | None = None, filters: dict[str, str] | str | None = None, ) → list[WindowInfo]

List tmux windows (terminal tabs) in a session, or across the server.

Description#

Use for tmux windows — 'current window', 'this tab' (when terminal- contextual) — not browser tabs or desktop windows. Only searches window metadata (name, index, layout); to search the actual visible terminal text, use search_panes.

Parameters
  • session_name (str | None) # – Session name to look up. If omitted along with session_id, returns windows from all sessions.

  • session_id (str | None) # – Session ID (e.g. '$1') to look up.

  • socket_name (str | None) # – tmux socket name. Defaults to LIBTMUX_SOCKET env var.

  • filters (dict[str, str] | str | None) # – Django-style filters as a dict (e.g. {"window_name__contains": "dev"}) or as a JSON string. Some MCP clients require the string form.

Returns

list[WindowInfo] List of serialized window objects.

Esc

Type to search.

Reference preview Open reference