libtmux_mcp.tools.pane_tools.snapshot_pane
-
Snapshot a tmux pane: visible terminal output, cursor, mode, scroll.
Description#
Use for terminal-contents inspection — 'what's in my pane', 'the current shell output' — not editor panes or browser viewports. Returns everything
capture_paneandget_pane_inforeturn, plus cursor position, copy-mode state, and scroll position — in a single call. Prefer this over separate capture_pane + get_pane_info calls when you need to reason about cursor location or pane mode.The
contentfield is tail-preserved: when the captured pane exceedsmax_lines, the oldest lines are dropped and the result is reported viacontent_truncated/content_truncated_linesfields on the returnedPaneSnapshot. Passmax_lines=Noneto opt out of truncation entirely.- Parameters
-
-
session_name(str | None) # – Session name for pane resolution. -
session_id(str | None) # – Session ID (e.g. '$1') for pane resolution. -
max_lines(int | None) # – Maximum number of content lines to return. Defaults toCAPTURE_DEFAULT_MAX_LINES. PassNoneto return the full capture untrimmed. -
socket_name(str | None) # – tmux socket name.
- Returns
-
PaneSnapshot Rich snapshot with content, cursor, mode, and scroll state. When the capture is trimmed,
content_truncatedis True andcontent_truncated_linesgives the number of dropped head lines;contentitself carries no marker header.