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

libtmux_mcp.tools.pane_tools.snapshot_pane

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

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
function [source]
function [source]
libtmux_mcp.tools.pane_tools.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 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
  • pane_id ( str | None ) – Pane ID (e.g. '%1').

  • session_name ( str | None ) – Session name for pane resolution.

  • session_id ( str | None ) – Session ID (e.g. '$1') for pane resolution.

  • window_id ( str | None ) – Window ID for pane resolution.

  • max_lines ( int | None ) – Maximum number of content lines to return. Defaults to CAPTURE_DEFAULT_MAX_LINES. Pass None to 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_truncated is True and content_truncated_lines gives the number of dropped head lines; content itself carries no marker header.

Esc

Type to search.