# list_panes

Source: https://libtmux.org/en/py/stable/mcp/tools/list_panes/

> List tmux panes (terminal multiplexer splits) in a window, session, or server.

tool MCPstable

MCP is in development

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

* **list_panes**( [filters](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Ffilters)?: [Record](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)")\<string, [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)")> | [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [session_id](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fsession_id)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [session_name](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fsession_name)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [socket_name](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fsocket_name)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [window_id](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fwindow_id)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [window_index](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fwindow_index)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), )

  tool \[[source](https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/window_tools.py#L501)][¶](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes)

  List tmux panes (terminal multiplexer splits) in a window, session, or server.

  Use for terminal panes — including ‘this pane’, ‘current pane’, ‘split pane’, ‘the bottom shell’ — not editor splits or browser panes. Only searches pane metadata (current command, title, working directory); to search the actual visible terminal text, use [search_panes](https://libtmux.org/en/py/stable/mcp/tools/search_panes/).

  * MCP request method

    `tools/call` Send `list_panes` as the tool name, with the arguments below.

  ## Arguments[#](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.parameters)

  * **[`filters`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Ffilters)**? = `null` ([Record](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)")\<string, [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)")> | [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

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

  * **[`session_id`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fsession_id)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Session ID. If given without window params, lists all panes in the session.

  * **[`session_name`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fsession_name)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Session name. If given without window params, lists all panes in the session.

  * **[`socket_name`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fsocket_name)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    tmux socket name.

  * **[`window_id`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fwindow_id)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Window ID (e.g. ‘@1’). Scopes to a single window.

  * **[`window_index`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.input%2Fproperties%2Fwindow_index)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Window index within the session. Scopes to a single window.

  No other arguments are accepted.

  ## Result[#](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.result)

  Returns [object](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)")

  * **[`result`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult)** ([Array](https://json-schema.org/understanding-json-schema/reference/array "array (JSON Schema)")<[object](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)")>)

    * **[Items](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems)** ([object](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)"))

      Serialized tmux pane.

      * **[`is_caller`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fis_caller)**? = `null` ([boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        MCP caller identity for this pane. `True` when the pane matches the caller’s `TMUX_PANE` *and* lives on the same tmux socket as the caller’s `TMUX` (verified via socket realpath); `False` otherwise, including the case where the pane id matches but the socket does not or cannot be proven to; `None` when the MCP process is not running inside tmux at all.

      * **[`pane_active`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_active)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Active flag (‘1’ or ‘0’)

      * **[`pane_at_bottom`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_at_bottom)**? = `null` ([boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        True when the pane touches the window’s bottom edge.

      * **[`pane_at_left`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_at_left)**? = `null` ([boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        True when the pane touches the window’s left edge.

      * **[`pane_at_right`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_at_right)**? = `null` ([boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        True when the pane touches the window’s right edge.

      * **[`pane_at_top`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_at_top)**? = `null` ([boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        True when the pane touches the window’s top edge. tmux accounts for [`pane-border-status`](https://libtmux.org/en/tmux/latest/catalog/options/pane-border-status/) here, so the top row may be 1 instead of 0 when the status bar is at the top.

      * **[`pane_bottom`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_bottom)**? = `null` ([integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Bottom edge row (inclusive), window-relative.

      * **[`pane_current_command`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_current_command)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Running command

      * **[`pane_current_path`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_current_path)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Current working directory

      * **[`pane_height`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_height)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Height in rows

      * **[`pane_id`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_id)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

        Pane ID (e.g. ‘%1’)

      * **[`pane_index`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_index)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Pane index

      * **[`pane_left`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_left)**? = `null` ([integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Left edge column, 0-based and window-relative.

      * **[`pane_pid`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_pid)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Process ID

      * **[`pane_right`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_right)**? = `null` ([integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Right edge column (inclusive), window-relative.

      * **[`pane_title`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_title)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Pane title

      * **[`pane_top`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_top)**? = `null` ([integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Top edge row, 0-based and window-relative.

      * **[`pane_tty`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_tty)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        TTY device path of the pane (e.g. ‘/dev/pts/5’).

      * **[`pane_width`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fpane_width)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Width in columns

      * **[`session_id`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fsession_id)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Parent session ID

      * **[`window_id`](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.output%2Fproperties%2Fresult%2Fitems%2Fproperties%2Fwindow_id)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

        Parent window ID

  ## Annotations[#](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.annotations)

  * [`destructiveHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#destructiveHint)

    `true`

  * [`idempotentHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#idempotentHint)

    `false`

  * [`openWorldHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#openWorldHint)

    `true`

  * [`readOnlyHint`](https://libtmux.org/en/py/stable/mcp/reference/glossary/#readOnlyHint)

    `false`

  ## Protocol data[#](https://libtmux.org/en/py/stable/mcp/tools/list_panes/#mcp.tool.list_panes.schemas)

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "additionalProperties": false,
    "properties": {
      "filters": {
        "anyOf": [
          {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Django-style filters as a dict\n(e.g. ``{\"pane_current_command__contains\": \"vim\"}``)\nor as a JSON string. Some MCP clients require the string form."
      },
      "session_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session ID. If given without window params, lists all panes\nin the session."
      },
      "session_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session name. If given without window params, lists all panes\nin the session."
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name."
      },
      "window_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Window ID (e.g. '@1'). Scopes to a single window."
      },
      "window_index": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Window index within the session. Scopes to a single window."
      }
    },
    "type": "object"
  }
  ```

  Output schema

  ```json
  {
    "properties": {
      "result": {
        "items": {
          "description": "Serialized tmux pane.",
          "properties": {
            "is_caller": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "MCP caller identity for this pane. ``True`` when the pane matches the caller's ``TMUX_PANE`` *and* lives on the same tmux socket as the caller's ``TMUX`` (verified via socket realpath); ``False`` otherwise, including the case where the pane id matches but the socket does not or cannot be proven to; ``None`` when the MCP process is not running inside tmux at all."
            },
            "pane_active": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Active flag ('1' or '0')"
            },
            "pane_at_bottom": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "True when the pane touches the window's bottom edge."
            },
            "pane_at_left": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "True when the pane touches the window's left edge."
            },
            "pane_at_right": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "True when the pane touches the window's right edge."
            },
            "pane_at_top": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "True when the pane touches the window's top edge. tmux accounts for ``pane-border-status`` here, so the top row may be 1 instead of 0 when the status bar is at the top."
            },
            "pane_bottom": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Bottom edge row (inclusive), window-relative."
            },
            "pane_current_command": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Running command"
            },
            "pane_current_path": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Current working directory"
            },
            "pane_height": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Height in rows"
            },
            "pane_id": {
              "description": "Pane ID (e.g. '%1')",
              "type": "string"
            },
            "pane_index": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Pane index"
            },
            "pane_left": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Left edge column, 0-based and window-relative."
            },
            "pane_pid": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Process ID"
            },
            "pane_right": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Right edge column (inclusive), window-relative."
            },
            "pane_title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Pane title"
            },
            "pane_top": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Top edge row, 0-based and window-relative."
            },
            "pane_tty": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "TTY device path of the pane (e.g. '/dev/pts/5')."
            },
            "pane_width": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Width in columns"
            },
            "session_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Parent session ID"
            },
            "window_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Parent window ID"
            }
          },
          "required": [
            "pane_id"
          ],
          "type": "object"
        },
        "type": "array"
      }
    },
    "required": [
      "result"
    ],
    "type": "object",
    "x-fastmcp-wrap-result": true
  }
  ```
