# list_windows

Source: https://libtmux.org/en/java/latest/mcp/tools/list_windows/

> Lists windows, optionally only those in one session, named by ID or by name. Inspect tmux metadata; accepts no client-supplied executable input.

MCP is in development

Server behavior and tool contracts may change. Tool availability depends on the server configuration.

Lists windows, optionally only those in one session, named by ID or by name. Inspect tmux metadata; accepts no client-supplied executable input.

[All Java tools](https://libtmux.org/en/java/latest/mcp/tools/) · [JSON](https://libtmux.org/en/java/latest/mcp/tools/list_windows.json) · [Source](https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux-mcp/src/main/java/io/github/libtmux/mcp/InspectTools.java#L53)

## Arguments

* `session_id` optional · string

  Only windows in this session, such as $1.

* `session_name` optional · string

  Only windows in the session with this exact name.

## Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "session_id": {
      "description": "Only windows in this session, such as $1.",
      "type": "string"
    },
    "session_name": {
      "description": "Only windows in the session with this exact name.",
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}
```

Output schema

```json
{
  "additionalProperties": false,
  "properties": {
    "count": {
      "type": "integer"
    },
    "note": {
      "type": "string"
    },
    "windows": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "active": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "index": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "panes": {
            "type": "integer"
          },
          "session": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "index",
          "name",
          "session",
          "active",
          "panes"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "count",
    "windows"
  ],
  "type": "object"
}
```

Tool annotations

```json
{
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true,
  "readOnlyHint": false,
  "title": "List windows"
}
```
