wait_for_text
-
Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Wait until a pane prints something matching one of these patterns, then return. Use for output you did NOT start — a server’s ready line, another process’s progress, a person typing. A matching pattern already on screen returns PresentAtEntry. For a command you are running yourself, run_shell_command is better: it reports the real exit status instead of guessing from text. Never poll capture_pane in a loop; this call does the waiting. Control observation is required by default; pollingFallback reports activation when the operator permits fallback. Text this server itself typed is discounted while deciding what is new, for a few seconds after it is sent or submitted, so its own echo cannot be the match — except on a pane whose program has not yet configured its terminal; wait for a first prompt before typing into a freshly created pane.
- MCP request method
tools/callSendwait_for_textas the tool name, with the arguments below.
Arguments
-
ignoreCase? =true(boolean)Ignore case.
-
paneId? =null(string | null)A pane id. Omit for this server’s own pane, or else the one the first session shows.
-
patterns? =null(Array<string | null> | null)Linear-time regular expressions that end the wait successfully: .NET syntax without lookarounds, backreferences or atomic groups. Output arriving after this call counts unless the pattern is already present, which returns PresentAtEntry. Omit to return on any new output. Across both pattern lists: at most 32 entries and 16384 UTF-8 bytes; each entry is at most 999 UTF-8 bytes.
-
stopPatterns? =null(Array<string | null> | null)Linear-time regular expressions that stop the wait, in the same subset as patterns. Omit for none. Across both pattern lists: at most 32 entries and 16384 UTF-8 bytes; each entry is at most 999 UTF-8 bytes.
-
timeoutSeconds? =null(number | null)Seconds to wait, lowered to the server’s ceiling. Omit to wait the whole ceiling, 30 unless LIBTMUX_MCP_WAIT_MAX_SECONDS sets another.
No other arguments are accepted.
Result
Returns object
-
matchedPattern(string | null) -
outcome("Matched" | "AnyOutput" | "Stopped" | "Timeout" | "PaneDied" | "PresentAtEntry")
Annotations
Advertised by the server
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalsetitle"Wait for text"
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": {"ignoreCase": {"default": true,"description": "Ignore case.","type": "boolean"},"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"]},"patterns": {"default": null,"description": "Linear-time regular expressions that end the wait successfully: .NET syntax without lookarounds, backreferences or atomic groups. Output arriving after this call counts unless the pattern is already present, which returns PresentAtEntry. Omit to return on any new output. Across both pattern lists: at most 32 entries and 16384 UTF-8 bytes; each entry is at most 999 UTF-8 bytes.","items": {"type": ["string","null"]},"type": ["array","null"]},"stopPatterns": {"default": null,"description": "Linear-time regular expressions that stop the wait, in the same subset as patterns. Omit for none. Across both pattern lists: at most 32 entries and 16384 UTF-8 bytes; each entry is at most 999 UTF-8 bytes.","items": {"type": ["string","null"]},"type": ["array","null"]},"timeoutSeconds": {"default": null,"description": "Seconds to wait, lowered to the server's ceiling. Omit to wait the whole ceiling, 30 unless LIBTMUX_MCP_WAIT_MAX_SECONDS sets another.","type": ["number","null"]}},"type": "object"}Output schema
{"properties": {"anchorLost": {"type": "boolean"},"effectiveTimeoutSeconds": {"type": "number"},"elapsedSeconds": {"type": "number"},"eventsDropped": {"type": "integer"},"linesMissed": {"type": "boolean"},"matchedPattern": {"type": ["string","null"]},"outcome": {"enum": ["Matched","AnyOutput","Stopped","Timeout","PaneDied","PresentAtEntry"],"type": "string"},"paneId": {"type": "string"},"pollingFallback": {"type": "boolean"},"tail": {"properties": {"droppedBytes": {"type": "integer"},"droppedLines": {"type": "integer"},"lines": {"items": {"type": "string"},"type": "array"},"truncated": {"type": "boolean"}},"required": ["lines","truncated","droppedLines","droppedBytes"],"type": "object"}},"required": ["paneId","outcome","matchedPattern","tail","elapsedSeconds","effectiveTimeoutSeconds"],"type": "object"}