MCPAPI Reference

Choose documentation 3

latest

Current version

latest
English

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

snapshot_pane

Snapshot a tmux pane: visible terminal output, cursor, mode, scroll.

Use for terminal-contents inspection — ‘what’s in my pane’, ‘the current shell output’ — not editor panes or browser viewports. Returns everything :func:~libtmux_mcp.tools.pane_tools.capture_pane and :func:~libtmux_mcp.tools.pane_tools.get_pane_info return, plus cursor position, copy-mode state, and scroll position — in a single call. Prefer this over separate capture_pane + get_pane_info calls when you need to reason about cursor location or pane mode.

The content field is tail-preserved: when the captured pane exceeds max_lines, the oldest lines are dropped and the result is reported via content_truncated / content_truncated_lines fields on the returned :class:~libtmux_mcp.models.PaneSnapshot. Pass max_lines=None to opt out of truncation entirely.

All Python tools · JSON · Source

Arguments

max_lines optional
Maximum number of content lines to return. Defaults to ``CAPTURE_DEFAULT_MAX_LINES``. Pass ``None`` to return the full capture untrimmed.

Default: 500.

pane_id optional
Pane ID (e.g. '%1').

Default: null.

session_id optional
Session ID (e.g. '$1') for pane resolution.

Default: null.

session_name optional
Session name for pane resolution.

Default: null.

socket_name optional
tmux socket name.

Default: null.

window_id optional
Window ID for pane resolution.

Default: null.

Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema
{
"additionalProperties": false,
"properties": {
"max_lines": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 500,
"description": "Maximum number of content lines to return. Defaults to\n``CAPTURE_DEFAULT_MAX_LINES``.\nPass ``None`` to return the full capture untrimmed."
},
"pane_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Pane ID (e.g. '%1')."
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Session ID (e.g. '$1') for pane resolution."
},
"session_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Session name for pane resolution."
},
"socket_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "tmux socket name."
},
"window_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Window ID for pane resolution."
}
},
"type": "object"
}
Tool annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false
}
Esc

Type to search.