libtmux_mcp.tools.pane_tools.capture_pane
Python
- Python
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- libtmux_mcp.tools.pane_tools.capture_pane ( pane_id : str | None = None , session_name : str | None = None , session_id : str | None = None , window_id : str | None = None , start : int | None = None , end : int | None = None , max_lines : int | None = CAPTURE_DEFAULT_MAX_LINES , socket_name : str | None = None ) str
-
Capture the visible contents of a tmux pane (terminal scrollback).
Use for tmux pane output — 'capture the build log', 'what did the server print' — not editor file contents. The tool for reading what is displayed in a terminal; use search_panes to search across multiple panes at once.
Output is tail-preserved: when the capture exceeds
max_linesthe oldest lines are dropped and the returned string is prefixed with a single[... truncated K lines ...]header line so the agent can tell truncation occurred and re-request with a narrowerstart/endwindow or a largermax_linesif needed. Passmax_lines=Noneto disable truncation entirely.- Parameters
-
-
session_name ( str | None ) – Session name for pane resolution.
-
session_id ( str | None ) – Session ID (e.g. '$1') for pane resolution.
-
start ( int | None ) – Start line number. 0 is the first visible line. Negative values reach into scrollback history (e.g. -100 for last 100 lines).
-
max_lines ( int | None ) – Maximum number of lines to return. Defaults to
CAPTURE_DEFAULT_MAX_LINES. PassNoneto return the full capture with no truncation.
- Returns
-
str Captured pane content as text. When truncated, the first line is a
[... truncated K lines ...]marker.