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/callSendwait_for_textas the tool name, with the arguments below.
Arguments#
-
a cursor returned by an earlier capture
-
maximum observed lines to return
-
the pane id, such as %1
-
patterns? (null | Array<string>) #text to wait for; any one ends the wait
- maxItems
32
-
treat patterns and stops as regular expressions
-
stop? (null | Array<string>) #failure text; any one ends the wait
- maxItems
32
-
seconds to wait before giving up
- minimum
0
No other arguments are accepted.
Result#
Returns object
No other properties are accepted.
Annotations#
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalsetitle"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"}