Skip to main content
Glama

glass_wait_for_log

Read-only

Wait for a specific log substring to appear, using cursors to include buffered history or only future lines. Returns matched status or timeout.

Instructions

After an action, use cursor:0 for buffered logs; for repeated events drain glass_logs before acting and pass its final cursor. Omit cursor for future lines only. Match a substring; timeout: matched:false. Resume from returned cursor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoCursor after draining logs before the action; 0 includes retained history. Omit for future lines only.
streamNo"stdout", "stderr", or "both" (default).
containsYesSubstring to wait for (required, non-empty).
timeout_msNoGive up after this long (default 10000ms); returns `{matched:false}`.
interval_msNoPoll interval (default 100ms).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.8.0
    • changedInput schema / properties / cursor / description
      Previous value: -"Start scanning from this cursor (from a prior glass_logs). Omit to match\nonly lines emitted after this call."New value: +"Cursor after draining logs before the action; 0 includes retained history. Omit for future lines only."
  2. Addedv1.2.0
  3. Removedv1.1.0
  4. Addedv1.0.3
  5. Removedv1.0.3
  6. First observedv1.0.1

TDQS

A4.5/5.0
Behavior5/5

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

The description surfaces important behavioral details beyond the readOnlyHint: cursor semantics, the need to drain glass_logs in repeated-event scenarios, substring matching behavior, timeout results (`matched:false`), and resuming from a returned cursor. These are non-obvious traits that materially affect invocation.

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?

Four short sentences deliver dense operational guidance with no filler. The most important usage decision (cursor:0 for buffered logs) is front-loaded, and each sentence covers a distinct necessary behavior.

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

Completeness4/5

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

The description covers the key waiting, cursor, timeout, and resume behaviors, and the schema fills parameter details. With no output schema, it could more explicitly define the success return shape, but the mention of `matched:false` and 'returned cursor' gives enough guidance for correct use.

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?

The schema already documents all five parameters, so the description is not the primary source of parameter meaning. However, the description adds workflow context around cursor: 'for repeated events drain glass_logs before acting and pass its final cursor' and 'Resume from returned cursor,' extending the schema's definitions.

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?

The description implies the tool waits for a log line matching a substring, and it clearly associates cursor behavior with log positions. It references glass_logs, which helps distinguish it from the related log-reading sibling, though it never states 'wait for a log' as an explicit verb+resource declaration.

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

Usage Guidelines5/5

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

The description gives concrete, scenario-based usage instructions: use cursor:0 for buffered logs, drain glass_logs before repeated actions and pass its final cursor, and omit cursor to wait only for future lines. This is explicit operational guidance that lets an agent decide exactly how to invoke the tool.

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