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.

MoreLess about this notice

Concept example A working example of the core library. It can change without notice. What concept means

tool MCP

capture_pane

Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Read the text a pane is showing, and optionally its scrollback. The newest lines are always kept; anything dropped to fit the budget is reported. To watch a pane across several turns, 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.
Wraps
LibTmux.Pane.CaptureAsyncThe library call this tool makes: src/LibTmux.Mcp/Tools/ReadTools.Pane.cs:109.

Arguments

  • includeHistory? = false (boolean)

    Include scrollback.

  • joinWrappedLines? = false (boolean)

    Rejoin tmux-wrapped lines.

  • maxLines? = null (integer | null)

    Maximum returned lines, newest kept. Omit for the server default, 500 unless LIBTMUX_MCP_MAX_LINES sets another.

    minimum
    -2147483648
    maximum
    2147483647
  • paneId? = null (string | null)

    A pane id. Omit for this server’s own pane, or else the one the first session shows.

No other arguments are accepted.

Result

Returns object

Annotations

Advertised by the server

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false
title
"Capture pane"

Capability

Toolset
Inspect Request tmux state and terminal output.
Process reach
none
tmux effects
observe

Every C# tool advertises the same annotations, so a host that approves by annotation cannot tell tools apart. The capability row is what tells them apart.

Protocol data

Use the complete advertised contract for validation and client integration.

Input schema
{
"additionalProperties": false,
"properties": {
"includeHistory": {
"default": false,
"description": "Include scrollback.",
"type": "boolean"
},
"joinWrappedLines": {
"default": false,
"description": "Rejoin tmux-wrapped lines.",
"type": "boolean"
},
"maxLines": {
"default": null,
"description": "Maximum returned lines, newest kept. Omit for the server default, 500 unless LIBTMUX_MCP_MAX_LINES sets another.",
"maximum": 2147483647,
"minimum": -2147483648,
"type": [
"integer",
"null"
]
},
"paneId": {
"default": null,
"description": "A pane id. Omit for this server's own pane, or else the one the first session shows.",
"type": [
"string",
"null"
]
}
},
"type": "object"
}
Output schema
{
"properties": {
"content": {
"properties": {
"droppedBytes": {
"type": "integer"
},
"droppedLines": {
"type": "integer"
},
"lines": {
"items": {
"type": "string"
},
"type": "array"
},
"truncated": {
"type": "boolean"
}
},
"required": [
"lines",
"truncated",
"droppedLines",
"droppedBytes"
],
"type": "object"
},
"paneId": {
"type": "string"
}
},
"required": [
"paneId",
"content"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference