List sessionsΒΆ

list_sessionsΒΆ

list_sessions
ΒΆ
readonly tool

List all tmux sessions.

Returns:

list[SessionInfo]

Use when you need session names, IDs, or attached status before deciding which session to target.

Avoid when you need window or pane details β€” use list_windows or list_panes instead.

Side effects: None. Readonly.

Example:

{
  "tool": "list_sessions",
  "arguments": {}
}

Response:

[
  {
    "session_id": "$0",
    "session_name": "myproject",
    "window_count": 2,
    "session_attached": "0",
    "session_created": "1774521871"
  }
]

Parameters

Parameter

Type

Required

Default

Description

socket_name

str

no

β€”

tmux socket name. Defaults to LIBTMUX_SOCKET env var.

filters

dict[str, str] | str

no

β€”

Django-style filters as a dict (e.g. {"session_name__contains": "dev"}) or as a JSON string. Some MCP clients require the string form.