Snapshot pane¶
snapshot_pane¶
Snapshot a tmux pane: visible terminal output, cursor, mode, scroll.
- Returns:
Use when you need a complete picture of a pane in a single call — visible
text plus cursor position, whether the pane is in copy mode, scroll offset,
and scrollback history size. Replaces separate capture_pane +
get_pane_info calls when you need to reason about cursor location or
terminal mode.
Avoid when you only need raw text — capture_pane is lighter.
Side effects: None. Readonly.
Example:
{
"tool": "snapshot_pane",
"arguments": {
"pane_id": "%0"
}
}
Response:
{
"pane_id": "%0",
"content": "$ npm test\n\nPASS src/auth.test.ts\nTests: 3 passed\n$",
"cursor_x": 2,
"cursor_y": 4,
"pane_width": 80,
"pane_height": 24,
"pane_left": 0,
"pane_top": 0,
"pane_right": 79,
"pane_bottom": 23,
"pane_at_left": true,
"pane_at_right": true,
"pane_at_top": true,
"pane_at_bottom": true,
"pane_tty": "/dev/pts/5",
"pane_in_mode": false,
"pane_mode": null,
"scroll_position": null,
"history_size": 142,
"title": null,
"pane_current_command": "zsh",
"pane_current_path": "/home/user/myproject",
"is_caller": false
}
The geometry block (pane_left / pane_top / pane_right /
pane_bottom and the four pane_at_* predicates) is fetched in the
same display-message round-trip as the cursor and mode fields, so
there is no extra tmux call. To target a layout-relative pane (e.g.
“the bottom-right pane”) use find_pane_by_position
instead of computing edges from this snapshot.
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 |
|
Maximum number of content lines to return. Defaults to :data: |
|
|
no |
— |
tmux socket name. |