{
  "name": "list_servers",
  "wireName": "list_servers",
  "source": {
    "repo": "tmux-python/libtmux-mcp",
    "revision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "extractedRevision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "file": "src/libtmux_mcp/tools/server_tools.py",
    "line": 367
  },
  "description": "Discover live tmux servers under the current user's ``$TMUX_TMPDIR``.\n\nScans ``${TMUX_TMPDIR:-/tmp}/tmux-<uid>/`` for socket files — the\ncanonical location where tmux creates per-server sockets (see\ntmux.c's ``expand_paths`` + ``TMUX_SOCK`` template). Only sockets\nwith a live listener are reported; stale inodes (a common case on\nlong-running systems where ``$TMUX_TMPDIR`` can carry thousands of\norphans) are silently filtered.\n\n**Scope caveat**: custom ``tmux -S /some/path/...`` servers that\nlive OUTSIDE ``$TMUX_TMPDIR`` are not returned by the scan alone —\nthere is no canonical registry for arbitrary socket paths. Supply\nknown paths via ``extra_socket_paths`` to include them in the\nresult, or pass the path to other tools via their ``socket_name``\n/ ``socket_path`` parameters once known.",
  "schemaStatus": "runtime",
  "inputSchema": {
    "additionalProperties": false,
    "properties": {
      "extra_socket_paths": {
        "anyOf": [
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Additional filesystem paths to probe alongside the\n``$TMUX_TMPDIR`` scan. Each path is checked for liveness (UNIX\n``connect()``) and queried for server metadata. Paths that do\nnot exist, are not sockets, or have no listener are silently\nskipped."
      }
    },
    "type": "object"
  },
  "outputSchema": {
    "properties": {
      "result": {
        "items": {
          "description": "Serialized tmux server info.",
          "properties": {
            "is_alive": {
              "description": "Whether the server is running",
              "type": "boolean"
            },
            "session_count": {
              "description": "Number of sessions",
              "type": "integer"
            },
            "socket_name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Socket name"
            },
            "socket_path": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Socket path"
            },
            "version": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "tmux version"
            }
          },
          "required": [
            "is_alive",
            "session_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"
      ]
    }
  }
}
