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.models.PaneSnapshot

class libtmux_mcp.models.PaneSnapshot
Bases:
  • BaseModel

Rich screen capture with metadata: content, cursor, mode, and scroll state.

Members

pane_id : str = Field(description="Pane ID (e.g. '%1')")
content : str = Field(description="Visible pane text")
cursor_x : int = Field(description="Cursor column (0-based)")
cursor_y : int = Field(description="Cursor row (0-based)")
pane_width : int = Field(description="Pane width in columns")
pane_height : int = Field(description="Pane height in rows")
pane_left : int | None = Field( default=None, description="Left edge column, 0-based and window-relative.", )
pane_top : int | None = Field( default=None, description="Top edge row, 0-based and window-relative.", )
pane_right : int | None = Field( default=None, description="Right edge column (inclusive), window-relative.", )
pane_bottom : int | None = Field( default=None, description="Bottom edge row (inclusive), window-relative.", )
pane_at_left : bool | None = Field( default=None, description="True when the pane touches the window's left edge.", )
pane_at_right : bool | None = Field( default=None, description="True when the pane touches the window's right edge.", )
pane_at_top : bool | None = Field( default=None, description=( "True when the pane touches the window's top edge. tmux " "accounts for ``pane-border-status`` here." ), )
pane_at_bottom : bool | None = Field( default=None, description="True when the pane touches the window's bottom edge.", )
pane_tty : str | None = Field( default=None, description="TTY device path of the pane (e.g. '/dev/pts/5').", )
pane_pid : str | None = Field(default=None, description="Process ID")
pane_dead : bool | None = Field( default=None, description="True when tmux reports the pane process has exited.", )
alternate_on : bool | None = Field( default=None, description="True when the pane is using the alternate screen.", )
pane_in_mode : bool = Field(description="True if pane is in copy-mode or view-mode")
pane_mode : str | None = Field( default=None, description="Mode name (e.g. 'copy-mode') or None if normal" )
scroll_position : int | None = Field( default=None, description="Lines scrolled back in copy mode (None if not in copy mode)", )
history_size : int = Field(description="Total scrollback lines available")
title : str | None = Field(default=None, description="Pane title")
pane_current_command : str | None = Field( default=None, description="Running command" )
pane_current_path : str | None = Field( default=None, description="Current working directory" )
is_caller : bool | None = Field( default=None, description=( "MCP caller identity for this pane. ``True`` when the pane " "matches the caller's ``TMUX_PANE`` *and* lives on the same " "tmux socket as the caller's ``TMUX`` (verified via socket " "realpath); ``False`` otherwise, including the case where " "the pane id matches but the socket does not or cannot be " "proven to; ``None`` when the MCP process is not running " "inside tmux at all." ), )
content_truncated : bool = Field( default=False, description=( "True if ``content`` was tail-preserved to stay within " "``max_lines``; oldest lines were dropped." ), )
content_truncated_lines : int = Field( default=0, description="Number of lines dropped from the head when truncating.", )
Esc

Type to search.

Reference preview Open reference