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.
All .NET tools · JSON · Source
Arguments
ignoreCaseoptional · boolean- Ignore case.
Default:
true. paneIdoptional · string | null- A pane id. Omit for the active pane.
Default:
null. patternsoptional · 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. stopPatternsoptional · 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. timeoutSecondsoptional · number | null- Requested timeout in seconds.
Default:
null.
Schemas
The schema defines required fields, nested values, defaults, and validation constraints.
Input schema
{ "additionalProperties": false, "properties": { "ignoreCase": { "default": true, "description": "Ignore case.", "type": "boolean" }, "paneId": { "default": null, "description": "A pane id. Omit for the active pane.", "type": [ "string", "null" ] }, "patterns": { "default": null, "description": "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.", "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. 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": "Requested timeout in seconds.", "type": [ "number", "null" ] } }, "type": "object"}Output schema
{ "properties": { "effectiveTimeoutSeconds": { "type": "number" }, "elapsedSeconds": { "type": "number" }, "matchedPattern": { "type": [ "string", "null" ] }, "outcome": { "enum": [ "Matched", "AnyOutput", "Stopped", "Timeout", "PaneDied", "PresentAtEntry" ], "type": "string" }, "paneId": { "type": "string" }, "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"}Tool annotations
{ "destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false, "title": "Wait for text"}