# snapshot_pane

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

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

MCP is in development

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

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 :func:`~libtmux_mcp.tools.pane_tools.capture_pane` and :func:`~libtmux_mcp.tools.pane_tools.get_pane_info` return, plus cursor position, copy-mode state, and scroll position — in a single call. Prefer this over separate [capture_pane](https://libtmux.org/en/py/latest/mcp/tools/capture_pane/) + [get_pane_info](https://libtmux.org/en/py/latest/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 :class:`~libtmux_mcp.models.PaneSnapshot`. Pass `max_lines=None` to opt out of truncation entirely.

[All Python tools](https://libtmux.org/en/py/latest/mcp/tools/) · [JSON](https://libtmux.org/en/py/latest/mcp/tools/snapshot_pane.json) · [Source](https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/pane_tools/__init__.py#L158)

## Arguments

* `max_lines` optional

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

  Default: `500`.

* `pane_id` optional

  Pane ID (e.g. '%1').

  Default: `null`.

* `session_id` optional

  Session ID (e.g. '$1') for pane resolution.

  Default: `null`.

* `session_name` optional

  Session name for pane resolution.

  Default: `null`.

* `socket_name` optional

  tmux socket name.

  Default: `null`.

* `window_id` optional

  Window ID for pane resolution.

  Default: `null`.

## Schemas

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

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"
}
```

Tool annotations

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