capture_pane
-
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.- MCP request method
tools/callSendcapture_paneas the tool name, with the arguments below.
Arguments#
-
end? =null(integer | null) #End line number.
-
max_lines? =500(integer | null) #Maximum number of lines to return. Defaults to
CAPTURE_DEFAULT_MAX_LINES. PassNoneto return the full capture with no truncation. -
pane_id? =null(string | null) #Pane ID (e.g. ‘%1’).
-
session_id? =null(string | null) #Session ID (e.g. ‘$1’) for pane resolution.
-
session_name? =null(string | null) #Session name for pane resolution.
-
socket_name? =null(string | null) #tmux socket name.
-
start? =null(integer | null) #Start line number. 0 is the first visible line. Negative values reach into scrollback history (e.g. -100 for last 100 lines).
-
window_id? =null(string | null) #Window ID for pane resolution.
No other arguments are accepted.
Result#
This server does not advertise an output schema for this tool. Its description defines the returned content.
Annotations#
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalse
Protocol data#
Use the complete advertised contract for validation and client integration.
Input schema
{"additionalProperties": false,"properties": {"end": {"anyOf": [{"type": "integer"},{"type": "null"}],"default": null,"description": "End line number."},"max_lines": {"anyOf": [{"type": "integer"},{"type": "null"}],"default": 500,"description": "Maximum number of lines to return. Defaults to\n``CAPTURE_DEFAULT_MAX_LINES``. Pass ``None`` to return the\nfull capture with no truncation."},"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."},"start": {"anyOf": [{"type": "integer"},{"type": "null"}],"default": null,"description": "Start line number. 0 is the first visible line. Negative values\nreach into scrollback history (e.g. -100 for last 100 lines)."},"window_id": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "Window ID for pane resolution."}},"type": "object"}