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

wait_for_text

Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Waits for new pane output without accepting executable input. Follows control output from tmux 3.7 and polls capture-pane below it, joining wrapped lines on both. Below 3.7, rows that scroll past between two reads can be missed without a flag; capture_since reports linesMissed. outcome says why it ended: matched, alreadyOnScreen, stopped, output, idle, timeout, paneDied or streamLost. paneDied means the pane was killed, its program exited under remain-on-exit, its window or session went, or the server stopped; lines holds the output it wrote first. The wait asks tmux once a second whether the pane is dead, and tmux’s answer decides. streamLost means the pane is still alive but its output stream ended, so lines may be incomplete: read it again with capture_since.

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

Arguments#

No other arguments are accepted.

Result#

Returns object

No other properties are accepted.

Annotations#

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false
title
"Wait for pane text"

Protocol data#

Use the complete advertised contract for validation and client integration.

Input schema
{
"additionalProperties": false,
"properties": {
"cursor": {
"description": "a cursor returned by an earlier capture",
"type": "string"
},
"max_lines": {
"description": "maximum observed lines to return",
"type": "integer"
},
"pane_id": {
"description": "the pane id, such as %1",
"type": "string"
},
"patterns": {
"description": "text to wait for; any one ends the wait",
"items": {
"maxLength": 4096,
"type": "string"
},
"maxItems": 32,
"type": [
"null",
"array"
]
},
"regex": {
"description": "treat patterns and stops as regular expressions",
"type": "boolean"
},
"stop": {
"description": "failure text; any one ends the wait",
"items": {
"maxLength": 4096,
"type": "string"
},
"maxItems": 32,
"type": [
"null",
"array"
]
},
"timeout": {
"description": "seconds to wait before giving up",
"minimum": 0,
"type": "number"
}
},
"required": [
"pane_id"
],
"type": "object"
}
Output schema
{
"additionalProperties": false,
"properties": {
"effectiveTimeoutSeconds": {
"type": "integer"
},
"elapsedSeconds": {
"type": "number"
},
"endNote": {
"type": "string"
},
"entryNote": {
"type": "string"
},
"found": {
"type": "boolean"
},
"lines": {
"items": {
"type": "string"
},
"type": [
"array"
]
},
"matched": {
"type": "string"
},
"matchedAtEntry": {
"type": "boolean"
},
"outcome": {
"type": "string"
},
"paneId": {
"type": "string"
},
"pendingInputOnly": {
"type": "boolean"
},
"timeoutClamped": {
"type": "boolean"
},
"truncated": {
"type": "boolean"
},
"truncatedBytes": {
"type": "integer"
},
"truncatedLines": {
"type": "integer"
}
},
"required": [
"paneId",
"outcome",
"found",
"matchedAtEntry",
"pendingInputOnly",
"elapsedSeconds",
"effectiveTimeoutSeconds",
"truncated"
],
"type": "object"
}
Esc

Type to search.

Reference previewOpen reference