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

libtmux_mcp.tools.pane_tools.capture_since

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.capture_since ( cursor : str | None = None , 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_SINCE_DEFAULT_MAX_LINES , max_bytes : int | None = CAPTURE_SINCE_DEFAULT_MAX_BYTES , socket_name : str | None = None ) → CaptureSinceResult
functionasync [source]
functionasync [source]
libtmux_mcp.tools.pane_tools.capture_since

Capture new tmux terminal scrollback since the previous cursor.

Use for observation-first workflows: tailing a shell, watching a long-running command, or repeatedly checking a tmux workspace pane without re-sending the same visible screen every turn. The first call with cursor=None returns the current visible pane and an opaque cursor. Later calls pass that cursor back and receive only rows written or rewritten after the cursor, as long as tmux still retains the required scrollback history.

If tmux history was cleared or trimmed before the cursor anchor, the tool returns the current visible pane with lines_missed=True and a fresh cursor. Malformed cursors, cursors for a different pane, pane death, and pane respawn fail with ExpectedToolError so agents do not accidentally observe the wrong process.

Parameters
  • cursor ( str | None ) – Opaque cursor returned by a prior capture_since call. When omitted, the tool captures the current visible screen and starts a new cursor.

  • pane_id ( str | None ) – Pane ID (e.g. '%1'). Optional when cursor is supplied; the cursor carries the original pane id.

  • 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 lines to return. Defaults to CAPTURE_SINCE_DEFAULT_MAX_LINES. Pass None to disable line truncation.

  • max_bytes ( int | None ) – Maximum UTF-8 bytes to return across lines. Defaults to CAPTURE_SINCE_DEFAULT_MAX_BYTES. Pass None to disable byte truncation.

  • socket_name ( str | None ) – tmux socket name.

Returns

CaptureSinceResult Structured lines, cursor, elapsed time, and truncation/loss metadata.

Discussed in Python MCP examples , Python MCP topics

Esc

Type to search.