Skip to main content
Glama

Wait for console lines

console_wait
Read-only

Blocks until a set number of console lines match a regex pattern, returning the lines and cursor for continued monitoring. Use it to wait for test batches or specific console output before proceeding.

Instructions

Blocks until count console lines matching regex are printed (from cursor, default: now), e.g. the end line of a test batch: {regex: "^BATCH DONE", count: 4, timeout_s: 900}. Returns the matching lines and next_cursor (just after the last one used: pass it to the next wait so nothing printed in between is missed). Reports progress; error timeout (with the lines found so far). Lines come from every realm and the engine (print, Msg, engine messages). Can run as an MCP task.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "regex": "<regex>"
    },
    "name": "console_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoLines to wait for (default 1).
regexYesECMAScript, case-insensitive.
cursorNoStart from this console cursor (from console_read, console_exec or an earlier wait). Default: now.
instanceNoOptional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance.
timeout_sNoDefault 30.

Output Schema

NameRequiredDescriptionDefault
lostNo
nextNo
noteNo
linesYes
matchedYes
warningNo
waited_sYes
next_callNo
answered_byNo
next_cursorYes
truncated_noteNo
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint/openWorldHint=false, so the description carries the real load: it discloses that the call blocks, that it reports progress, that timeout yields an error with partial results, that lines span every realm plus engine messages, and that it can run as an MCP task. That is substantial behavior beyond structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core contract in the first clause, then chained clarifications. Dense with parentheticals, but nearly every clause carries new information; only the return-value sentence is partially redundant with the output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter blocking wait with an output schema, the description covers semantics, failure mode, data sources, and cursor continuity. An agent has everything needed to invoke and chain it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description still adds meaning by explaining why `cursor` should be fed the previous wait's next_cursor and framing `count`/`timeout_s` inside a realistic example. It stops short of documenting the `instance` relay parameter, which the schema handles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb+resource: blocks until `count` console lines matching `regex` are printed. The blocking semantics plus the cursor-origin note (default: now) clearly distinguish it from a passive buffer read like console_read.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete scenario ('e.g. the end line of a test batch') with a full example invocation, and explains the cursor-chaining discipline for consecutive waits. No explicit when-not guidance, but the usage context is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.