# snapshot_pane

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

> Snapshot a tmux pane: visible terminal output, cursor, mode, scroll.

tool MCPstable

MCP is in development

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

* **snapshot_pane**( [max_lines](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.input%2Fproperties%2Fmax_lines)?: [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)"), [pane_id](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.input%2Fproperties%2Fpane_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_id](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.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/snapshot_pane/#mcp.tool.snapshot_pane.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/snapshot_pane/#mcp.tool.snapshot_pane.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/snapshot_pane/#mcp.tool.snapshot_pane.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)"), )

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

  Snapshot a tmux pane: visible terminal output, cursor, mode, scroll.

  Use for terminal-contents inspection — ‘what’s in my pane’, ‘the current shell output’ — not editor panes or browser viewports. Returns everything [`capture_pane`](https://libtmux.org/en/py/stable/mcp/tools/capture_pane/) and [`get_pane_info`](https://libtmux.org/en/py/stable/mcp/tools/get_pane_info/) return, plus cursor position, [copy-mode](https://libtmux.org/en/tmux/latest/manual/copy-mode/) state, and scroll position — in a single call. Prefer this over separate [capture_pane](https://libtmux.org/en/py/stable/mcp/tools/capture_pane/) + [get_pane_info](https://libtmux.org/en/py/stable/mcp/tools/get_pane_info/) calls when you need to reason about cursor location or pane mode.

  The `content` field is tail-preserved: when the captured pane exceeds `max_lines`, the oldest lines are dropped and the result is reported via `content_truncated` / `content_truncated_lines` fields on the returned [`PaneSnapshot`](https://libtmux.org/en/py/stable/mcp/reference/libtmux_mcp-models-panesnapshot/). Pass `max_lines=None` to opt out of truncation entirely.

  * MCP request method

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

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

  * **[`max_lines`](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.input%2Fproperties%2Fmax_lines)**? = `500` ([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)"))

    Maximum number of content lines to return. Defaults to `CAPTURE_DEFAULT_MAX_LINES`. Pass `None` to return the full capture untrimmed.

  * **[`pane_id`](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.input%2Fproperties%2Fpane_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)"))

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

  * **[`session_id`](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.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 (e.g. ‘$1’) for pane resolution.

  * **[`session_name`](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.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 for pane resolution.

  * **[`socket_name`](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.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/snapshot_pane/#mcp.tool.snapshot_pane.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 for pane resolution.

  No other arguments are accepted.

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

  This server does not advertise an output schema for this tool. Its description defines the returned content.

  ## Annotations[#](https://libtmux.org/en/py/stable/mcp/tools/snapshot_pane/#mcp.tool.snapshot_pane.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/snapshot_pane/#mcp.tool.snapshot_pane.schemas)

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "additionalProperties": false,
    "properties": {
      "max_lines": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": 500,
        "description": "Maximum number of content lines to return. Defaults to\n``CAPTURE_DEFAULT_MAX_LINES``.\nPass ``None`` to return the full capture untrimmed."
      },
      "pane_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Pane ID (e.g. '%1')."
      },
      "session_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session ID (e.g. '$1') for pane resolution."
      },
      "session_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session name for pane resolution."
      },
      "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 for pane resolution."
      }
    },
    "type": "object"
  }
  ```
