Skip to main content
Glama

wait_for

Block until a matching log event appears after triggering an action, then return it promptly. Avoid sleep-and-hope delays by waiting for the exact log line or error.

Instructions

Block until a matching event appears, then return it. This is the one to use after you trigger something: start the action, then wait for its log line or error rather than sleeping and hoping. Returns promptly on the first match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoOptional minimum level, e.g. ERROR
sinceNoOnly consider events after this cursor. Take a cursor BEFORE triggering your action so you cannot match something old.
topicNoOptional topic or prefix
containsNoText the event must contain (case-insensitive)
timeout_msNoHow long to wait (default 30000, max 120000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It states the blocking behavior ('Block until a matching event appears') and the prompt return ('Returns promptly on the first match'), which are the core traits. However, it does not disclose timeout behavior (though timeout_ms is in the schema), what happens on timeout, or whether the event is consumed. It gives the essentials but misses details that could affect agent expectations.

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

Conciseness5/5

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

Three sentences with zero waste. The core purpose is front-loaded, followed by the critical usage context, then a behavioral note. Every sentence earns its place and the structure is highly scannable for an agent.

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

Completeness3/5

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

The tool is relatively simple with 5 optional parameters and no output schema. The description clearly states it returns a matching event, but does not specify the return format (e.g., event object structure, fields). It also doesn't explain how the matching criteria combine (AND vs OR). Since there's no output schema, the description should have provided more detail on the return value. However, the schema covers the matching parameters, so it's not a critical gap. It's adequate but not complete.

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 coverage is 100% with each parameter well-described (level, since, topic, contains, timeout_ms). The description adds no parameter-level detail beyond the schema. It hints at cursor usage ('after you trigger something') but doesn't elaborate. This meets the baseline for high coverage, but description adds minimal value.

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?

The description clearly states the tool's function: 'Block until a matching event appears, then return it.' This is a specific verb (block) + resource (matching event) with a clear outcome. It also differentiates itself from siblings by framing its use case as the post-trigger wait tool, implying it's not for historical search or tailing. This is distinct and unambiguous.

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?

The description explicitly tells the agent when to use it: 'after you trigger something: start the action, then wait for its log line or error rather than sleeping and hoping.' This provides clear context for the primary use case. However, it does not mention specific alternative tools (e.g., tail_logs, search_logs) or when NOT to use it, so it lacks explicit exclusions. It's strong guidance but not complete routing to alternatives.

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