MCPpre-alphaAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

libtmux_mcp.tools.pane_tools.snapshot_pane

libtmux_mcp.tools.pane_tools.snapshot_pane ( pane_id: str | None = None, session_name: str | None = None, session_id: str | None = None, window_id: str | None = None, max_lines: int | None = CAPTURE_DEFAULT_MAX_LINES, socket_name: str | None = None, ) → PaneSnapshot

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_pane and get_pane_info return, 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 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 . Pass max_lines=None to opt out of truncation entirely.

Parameters
Returns

PaneSnapshot Rich snapshot with content, cursor, mode, and scroll state. When the capture is trimmed, content_truncated is True and content_truncated_lines gives the number of dropped head lines; content itself carries no marker header.

Esc

Type to search.

Reference preview Open reference