Capture pane¶
capture_pane¶
capture_paneCapture the visible contents of a tmux pane.
- Returns:
Use when you need to read what’s currently displayed in a terminal — after running a command, checking output, or verifying state.
Avoid when you need to search across multiple panes at once — use
search_panes. If you only need pane metadata (not content), use
get_pane_info.
Side effects: None. Readonly.
Example:
{
"tool": "capture_pane",
"arguments": {
"pane_id": "%0",
"start": -50
}
}
Response (string):
$ echo "Running tests..."
Running tests...
$ echo "PASS: test_auth (0.3s)"
PASS: test_auth (0.3s)
$ echo "FAIL: test_upload (AssertionError)"
FAIL: test_upload (AssertionError)
$ echo "3 tests: 2 passed, 1 failed"
3 tests: 2 passed, 1 failed
$
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
— |
Start line number. 0 is the first visible line. Negative values reach into scrollback history (e.g. -100 for last 100 lines). |
|
|
no |
— |
End line number. |
|
|
no |
|
Maximum number of lines to return. Defaults to :data: |
|
|
no |
— |
tmux socket name. |