Skip to main content
Glama

wait_for_event

Read-onlyIdempotent

Block until the first of several specified event kinds arrives in a workspace or thread, returning its log ID and event or null on timeout; pass after_log_id to replay missed events.

Instructions

Block until the first event of any of the listed kinds arrives in your workspace (or in one thread) and return {log_id, event}, or null when timeout_ms lapses. Use it to wait on several event kinds at once or to replay the log; wait_for_ready, wait_for_claim_expired, wait_for_claim_failed, wait_for_landed and wait_for_blocked_resolved fix one kind, wait_for_result and wait_for_memory_block return a payload instead of the event, and wait_for_mention and wait_for_notification wait on one member's mentions or notifications. Pass the log_id of the last event you handled as after_log_id to replay the log first; a loop that must see every event passes it on every call, since an event between two calls is otherwise missed. An unknown kind name is refused, events in a private channel you are not in or a DM you are not part of never wake it, and timeout_ms 0 only replays and needs after_log_id. Requires workspace:read.

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": {
      "kinds": "<kinds>"
    },
    "name": "wait_for_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindsYesEvent kind names in snake_case, at least one, such as thread_landed, thread_ready or message_posted. The first event of any listed kind wakes the call; an unknown name is refused.
thread_idNoUUID of a thread; only events in it count. Omitted, events anywhere in the workspace that you may read.
timeout_msNoWait window in milliseconds, up to 300000 (default 30000). 0 only replays the log and needs after_log_id.
after_log_idNoReplay logged events with a log_id greater than this before waiting; pass the log_id of the last event you handled. Required when timeout_ms is 0.
workspace_idNoUUID of your own workspace (the workspace_id from whoami); omitted, your own. Another workspace is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv479.0.2
    • changedInput schema / properties / after_log_id / description
      Previous value: -"replay logged events after this log_id before waiting"New value: +"Replay logged events with a log_id greater than this before waiting; pass the log_id of the last event you handled. Required when timeout_ms is 0."
    • changedInput schema / properties / kinds / description
      Previous value: -"event kind names in snake_case"New value: +"Event kind names in snake_case, at least one, such as thread_landed, thread_ready or message_posted. The first event of any listed kind wakes the call; an unknown name is refused."
    • changedInput schema / properties / thread_id / description
      Previous value: -"only events in this thread"New value: +"UUID of a thread; only events in it count. Omitted, events anywhere in the workspace that you may read."
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"how long to wait (default 30000)"New value: +"Wait window in milliseconds, up to 300000 (default 30000). 0 only replays the log and needs after_log_id."
    • changedInput schema / properties / workspace_id / description
      Previous value: -"your own workspace (whoami's workspace_id); omitted, the same"New value: +"UUID of your own workspace (the workspace_id from whoami); omitted, your own. Another workspace is refused."
  2. First observedv479.0.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly/idempotent/non-destructive and closed-world, so safety is covered; the description still adds real behavior beyond them: unknown kind names are refused, private-channel or foreign-DM events never wake the call, timeout_ms 0 only replays, and workspace:read is required. Since annotations carry much of the load and it adds meaningful edge-case context, this sits solidly above baseline but not exceptional.

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?

Purpose is front-loaded in the first sentence and every sentence carries distinct information; however, it is a single dense paragraph mixing purpose, sibling routing, replay semantics and permissions, which is harder to scan than a short structured form.

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?

With no output schema, the description correctly discloses the return shape and null-on-timeout case, and it covers auth and edge conditions. It leaves out default-timeout behavior and what an empty or truncated replay looks like, so it is good but not fully complete for a blocking primitive.

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 parameters are already documented, but the description adds the rationale the schema lacks: why after_log_id exists (replay the log first) and the correctness hazard that an event between two calls is otherwise missed. That is genuine meaning beyond the schema's mechanical wording.

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 — block until the first event of any listed kind — plus the return shape {log_id, event} or null on timeout. It then explicitly contrasts itself with each sibling waiter (wait_for_ready, wait_for_result, wait_for_mention, etc.), so an agent can select it without inspecting other schemas.

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?

Gives explicit when-to-use guidance: use it to wait on several event kinds at once or to replay the log, and spells out that the singular-kind siblings fix one kind while wait_for_result/wait_for_memory_block return payloads instead of events. It also prescribes the loop pattern (pass after_log_id on every call) and the degenerate timeout_ms 0 case.

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

Deploy Server

Other Tools