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
startreaches 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.- MCP request method
tools/callSendcapture_paneas the tool name, with the arguments below.
Arguments#
-
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.
- minimum
-9007199254740991- maximum
9007199254740991
-
joinWrapped? (boolean) #Rejoin lines tmux wrapped.
-
Keep at most this many lines, from the end. Defaults to the server limit.
- maximum
9007199254740991- exclusiveMinimum
0
-
Stable pane id, e.g. %1.
- pattern
"^%\\d+$"
-
First line; negative reaches into scrollback.
- minimum
-9007199254740991- maximum
9007199254740991
Result#
Returns object
-
Whether the byte ceiling shortened the capture.
-
Lines cut from the front to fit maxLines.
- minimum
-9007199254740991- maximum
9007199254740991
-
effectiveEnd(integer | null) #Matches one or more variants.
-
effectiveStart(integer | null) #Matches one or more variants.
-
- minimum
-9007199254740991- maximum
9007199254740991
-
Stable pane id, e.g. %1.
- pattern
"^%\\d+$"
-
Whether a result ceiling shortened the range.
-
- minimum
-9007199254740991- maximum
9007199254740991
-
How many lines the capture held before trimming.
- minimum
-9007199254740991- maximum
9007199254740991
No other properties are accepted.
Annotations#
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalse
Protocol data#
Use the complete advertised contract for validation and client integration.
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"}