Skip to main content
Glama

Wait for a console line

wait_for_log
Read-only

Waits for a new console line or script error containing specified text after an action, confirming its effect; returns matched false if the timeout occurs.

Instructions

Wait until a new console line (or script error) that contains the given text appears, then return it. Use it after an action to confirm its effect. Returns matched false when the timeout passes. Requires the bridge, and only sees lines that arrive after the call starts.

Input Schema

NameRequiredDescriptionDefault
levelNoOnly match console lines of this level.
clientNoOnly match lines from this client id (default: all clients).
containsYesText to wait for (case-insensitive).
timeout_msNoHow long to wait (default 10000).
include_errorsNoAlso match script errors (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare this is a read-only, non-open-world operation, and the description adds genuinely new behavior: it requires the bridge, only observes lines arriving after the call starts (a race caveat), and returns matched=false on timeout. Those are the facts an agent needs to interpret a miss correctly.

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?

Four short sentences, front-loaded with the core behavior, and every clause carries information. Slightly compressed, but nothing is filler.

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?

Despite there being no output schema, the description says what is returned on success and how failure looks (matched=false), and warns that it only sees new lines. For a five-parameter wait tool, that is enough to call and interpret it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the enum levels, client filter, timeout bound, and include_errors default are already documented. The description only restates the contains text and mentions script errors, adding no syntax or format detail beyond the schema; baseline 3 applies.

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

Purpose4/5

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

States a precise verb and resource: wait for a new console line (or script error) containing given text, then return it. That clearly separates it from get_logs, which retrieves existing lines, though no sibling is named explicitly.

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 explicit usage context: 'Use it after an action to confirm its effect.' That tells the agent when this tool is the right choice. It does not state when not to use it or name get_logs as the alternative for already-captured output.

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