# get_pane_content

Source: https://libtmux.org/en/py/latest/mcp/resources/templates/get_pane_content/

> Capture and return the content of a pane.

resource templateMCPlatest

MCP is in development

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

* `tmux://panes/{pane_id}/content{?socket_name}`

  resource template[¶](https://libtmux.org/en/py/latest/mcp/resources/templates/get_pane_content/#mcp.resource-template.tmux%3A%2F%2Fpanes%2F%7Bpane_id%7D%2Fcontent%7B%3Fsocket_name%7D)

  Capture and return the content of a pane.

  * MCP request method

    `resources/read` Send the resource URI shown above.

  * MIME type

    `text/plain`

  ## URI parameters[#](https://libtmux.org/en/py/latest/mcp/resources/templates/get_pane_content/#mcp.resource-template.tmux%3A%2F%2Fpanes%2F%7Bpane_id%7D%2Fcontent%7B%3Fsocket_name%7D.parameters)

  * `pane_id`[#](https://libtmux.org/en/py/latest/mcp/resources/templates/get_pane_content/#mcp.resource-template.tmux%3A%2F%2Fpanes%2F%7Bpane_id%7D%2Fcontent%7B%3Fsocket_name%7D.parameter.pane_id)

    The pane ID (e.g. ‘%1’).

    * Binding

      URI variable

  * `socket_name`[#](https://libtmux.org/en/py/latest/mcp/resources/templates/get_pane_content/#mcp.resource-template.tmux%3A%2F%2Fpanes%2F%7Bpane_id%7D%2Fcontent%7B%3Fsocket_name%7D.parameter.socket_name)

    tmux socket name. Defaults to LIBTMUX_SOCKET env var.

    * Binding

      Query variable

  ## Result[#](https://libtmux.org/en/py/latest/mcp/resources/templates/get_pane_content/#mcp.resource-template.tmux%3A%2F%2Fpanes%2F%7Bpane_id%7D%2Fcontent%7B%3Fsocket_name%7D.result)

  Returns resource contents for the requested URI with MIME type `text/plain`.

  str Plain text captured pane content (MIME: `text/plain`).

  ## Protocol data[#](https://libtmux.org/en/py/latest/mcp/resources/templates/get_pane_content/#mcp.resource-template.tmux%3A%2F%2Fpanes%2F%7Bpane_id%7D%2Fcontent%7B%3Fsocket_name%7D.schemas)

  Use the complete advertised contract for validation and client integration.

  Registration

  ```json
  {
    "_meta": {
      "fastmcp": {
        "tags": []
      }
    },
    "description": "Capture and return the content of a pane.\n\nParameters\n----------\npane_id : str\n    The pane ID (e.g. '%1').\nsocket_name : str, optional\n    tmux socket name. Defaults to LIBTMUX_SOCKET env var.\n\nReturns\n-------\nstr\n    Plain text captured pane content (MIME: ``text/plain``).",
    "mimeType": "text/plain",
    "name": "get_pane_content",
    "title": "Pane Content",
    "uriTemplate": "tmux://panes/{pane_id}/content{?socket_name}"
  }
  ```

Source revision: [tmux-python/libtmux-mcp@4daddc0dfca96c43bf521d818bf91564e1434760](https://github.com/tmux-python/libtmux-mcp/tree/4daddc0dfca96c43bf521d818bf91564e1434760).
