MCPconceptTools

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

tool MCPlatest

capture_pane

tool [source]

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.

MCP request method
tools/call Send capture_pane as the tool name, with the arguments below.

Arguments#

  • end? (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.

    minimum
    -9007199254740991
    maximum
    9007199254740991
  • joinWrapped? (boolean) #

    Rejoin lines tmux wrapped.

  • maxLines? (integer) #

    Keep at most this many lines, from the end. Defaults to the server limit.

    maximum
    9007199254740991
    exclusiveMinimum
    0
  • paneId (string) #

    Stable pane id, e.g. %1.

    pattern
    "^%\\d+$"
  • start? (integer) #

    First line; negative reaches into scrollback.

    minimum
    -9007199254740991
    maximum
    9007199254740991

Result#

Returns object

No other properties are accepted.

Annotations#

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false

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"
}
Esc

Type to search.

Reference previewOpen reference