{
  "name": "list_sessions",
  "wireName": "list_sessions",
  "source": {
    "repo": "tmux-python/libtmux-mcp",
    "revision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "extractedRevision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "file": "src/libtmux_mcp/tools/server_tools.py",
    "line": 362
  },
  "description": "List tmux sessions (terminal workspaces) on a tmux server.\n\nUse for tmux multiplexer sessions — 'this session', 'my workspace',\n'the dev session' — not login sessions or HTTP sessions. The starting\npoint for discovery — call this before targeting specific sessions,\nwindows, or panes.",
  "schemaStatus": "runtime",
  "inputSchema": {
    "additionalProperties": false,
    "properties": {
      "filters": {
        "anyOf": [
          {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Django-style filters as a dict (e.g. ``{\"session_name__contains\": \"dev\"}``)\nor as a JSON string. Some MCP clients require the string form."
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name. Defaults to LIBTMUX_SOCKET env var."
      }
    },
    "type": "object"
  },
  "outputSchema": {
    "properties": {
      "result": {
        "items": {
          "description": "Serialized tmux session.",
          "properties": {
            "active_pane_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Pane id (``%N``) of the session's active pane. Guaranteed non-None on ``create_session`` return (libtmux creates the session with one initial pane). May be None from ``list_sessions`` rows for sessions in transient teardown states where ``active_pane`` is unavailable."
            },
            "session_attached": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Attached client count"
            },
            "session_created": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Creation timestamp"
            },
            "session_id": {
              "description": "Session ID (e.g. '$1')",
              "type": "string"
            },
            "session_name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Session name"
            },
            "window_count": {
              "description": "Number of windows",
              "type": "integer"
            }
          },
          "required": [
            "session_id",
            "window_count"
          ],
          "type": "object"
        },
        "type": "array"
      }
    },
    "required": [
      "result"
    ],
    "type": "object",
    "x-fastmcp-wrap-result": true
  },
  "annotations": {
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": true,
    "readOnlyHint": false
  },
  "meta": {
    "fastmcp": {
      "tags": [
        "inspect"
      ]
    }
  }
}
