Skip to main content
Glama

editor_wait_for

Read-only

Waits for the first matching editor event, optionally filtered by text, and returns it or a timeout result. Use it to synchronize with play mode, reloads, or log output.

Instructions

Waits for the first editor event of a kind (see editor_events), optionally with a text, and returns it. Without sinceSeq it waits for an event after the call; with it, an event already recorded after that number counts. A timeout is a result (TimedOut true), not an error. Example: start play with editor_play_mode, then editor_wait_for kind=log textContains="[Test]" to read a game's answer.

Input Schema

NameRequiredDescriptionDefault
kindYesThe event kind, e.g. play_begin, reload_end, log.
sinceSeqNoCount events after this sequence number; omit to wait for a new one.
textContainsNoOnly an event whose text contains this (ordinal).
timeoutSecondsNoHow long to wait, up to 600 seconds.

Output Schema

NameRequiredDescriptionDefault
eventYes
lastSeqYes
matchedYes
secondsYes
timedOutYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint, and the description adds genuinely non-obvious behavior: a timeout is returned as a result with TimedOut true rather than raised as an error, which prevents the agent from treating a wait failure as fatal. It does not discuss error cases such as an unknown kind, and return shape is covered by the output schema.

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?

The blocking purpose is front-loaded in the first clause, then sinceSeq semantics, then the non-error timeout note, then a concrete example — every sentence carries distinct information. Slightly longer than a minimal definition, but nothing is redundant.

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?

With an output schema covering return values and full parameter documentation in the schema, the description supplies the missing pieces: blocking vs. replay behavior via sinceSeq, timeout-as-result semantics, and a worked usage example. Minor gaps remain around invalid kind handling, but nothing an agent needs to invoke it correctly is absent.

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, but the description earns above baseline by resolving the ambiguity of sinceSeq (its schema text 'Count events after this sequence number' is otherwise easy to misread) and by framing textContains as an optional text filter on the wait. It leaves kind and timeoutSeconds entirely to the schema.

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 specific verb and resource: waits for the first editor event of a given kind and returns it. It explicitly points to the sibling editor_events as the event catalog, so an agent can distinguish this blocking wait from the event-listing tool without opening either schema.

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 sinceSeq sentence gives a concrete decision rule (omit to wait for a future event, supply it to accept an already-recorded one), and the example shows the intended play-mode-then-wait workflow with editor_play_mode. It stops short of stating when not to use this tool (e.g. polling editor_events instead), so no explicit exclusions are present.

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