# wait_for_text

Source: https://libtmux.org/en/dotnet/latest/mcp/tools/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. Only output arriving AFTER the call counts: text already on screen never matches, so a pattern visible in the returned tail can still time out. 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. 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 is in development

Server behavior and tool contracts may change. Tool availability depends on the server configuration.

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. Only output arriving AFTER the call counts: text already on screen never matches, so a pattern visible in the returned tail can still time out. For a command you are running yourself, [run\_shell\_command](https://libtmux.org/en/dotnet/latest/mcp/tools/run_shell_command/) is better: it reports the real exit status instead of guessing from text. Never poll [capture\_pane](https://libtmux.org/en/dotnet/latest/mcp/tools/capture_pane/) in a loop; this call does the waiting. 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.

[All .NET tools](../) · [JSON](../wait_for_text.json) · [Source](https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux.Mcp/Policy/CapabilityModel.cs#L570)

## Arguments

* `ignoreCase` optional · boolean

  Ignore case.

  Default: `true`.

* `paneId` optional · string | null

  A pane id. Omit for the active pane.

  Default: `null`.

* `patterns` optional · array | null

  Linear-time regular expressions that end the wait successfully: .NET syntax without lookarounds, backreferences or atomic groups. Only output arriving after this call counts; text already on screen never matches. Across both pattern lists: at most 32 entries and 16384 UTF-8 bytes; each entry is at most 999 UTF-8 bytes.

  Default: `null`.

* `stopPatterns` optional · array | null

  Linear-time regular expressions that stop the wait, in the same subset as patterns. Across both pattern lists: at most 32 entries and 16384 UTF-8 bytes; each entry is at most 999 UTF-8 bytes.

  Default: `null`.

* `timeoutSeconds` optional · number | null

  Requested timeout in seconds.

  Default: `null`.

## Schemas

The schema defines required fields, nested values, defaults, and validation constraints.
