capture_pane
Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. The text a pane is showing, or its scrollback. Negative start reaches back into history (-100 is a hundred lines above the top of the screen). For repeated reads of the same pane use capture_since instead — it returns only what is new.
All TypeScript tools · JSON · Source
Arguments
endoptional · integer- Last line, on the same scale as start: 0 is the top of the visible screen and negative reaches back into history. It does not count back from the bottom, so end:-1 is one line above the screen top, not the last line of output.
joinWrappedoptional · boolean- Rejoin lines tmux wrapped.
maxLinesoptional · integer- Keep at most this many lines, from the end. Defaults to the server limit.
paneIdrequired · string- Stable pane id, e.g. %1.
startoptional · integer- First line; negative reaches into scrollback.
Schemas
The schema defines required fields, nested values, defaults, and validation constraints.
Input schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "end": { "description": "Last line, on the same scale as start: 0 is the top of the visible screen and negative reaches back into history. It does not count back from the bottom, so end:-1 is one line above the screen top, not the last line of output.", "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "joinWrapped": { "description": "Rejoin lines tmux wrapped.", "type": "boolean" }, "maxLines": { "description": "Keep at most this many lines, from the end. Defaults to the server limit.", "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" }, "paneId": { "description": "Stable pane id, e.g. %1.", "pattern": "^%\\d+$", "type": "string" }, "start": { "description": "First line; negative reaches into scrollback.", "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "paneId" ], "type": "object"}Output schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "byteClamped": { "description": "Whether the byte ceiling shortened the capture.", "type": "boolean" }, "droppedLines": { "description": "Lines cut from the front to fit maxLines.", "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "effectiveEnd": { "anyOf": [ { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, { "type": "null" } ] }, "effectiveStart": { "anyOf": [ { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, { "type": "null" } ] }, "omittedBytes": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "paneId": { "description": "Stable pane id, e.g. %1.", "pattern": "^%\\d+$", "type": "string" }, "rangeClamped": { "description": "Whether a result ceiling shortened the range.", "type": "boolean" }, "returnedBytes": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "text": { "type": "string" }, "totalLines": { "description": "How many lines the capture held before trimming.", "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "byteClamped", "droppedLines", "effectiveEnd", "effectiveStart", "omittedBytes", "paneId", "rangeClamped", "returnedBytes", "text", "totalLines" ], "type": "object"}Tool annotations
{ "destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}