Skip to main content
Glama

wait_events

Read-only

Blocks until managed sessions report state changes, approvals, resource limits, or due TODOs, then returns those events; set wait=false to poll immediately.

Instructions

見回り。管理中の会話の状態の変化・作業の会話からの報告・承認や入力の待ち・空きメモリ不足・利用枠の超過(pauseAtPct があるとき)と回復・資源待ちの仕事(room の TODO)を起こせる余裕(roomAvailable)・条件がそろった TODO(todoDue。1件につき1回。始める・済む・条件を直すまで、1時間ごとに repeat=true でまた返す)を、起きるまで待って返す(報告は書かれたらすぐ)。wait=false なら待たずに、いま分かる出来事だけを返す(Claude のデスクトップアプリの監視役が、起きるたびに1回呼ぶ)。何も起きなければ最長 intervalMin 分(省略時は設定の watchIntervalMin。設定より長くはできない)で timedOut を返す。待つ間はモデルを使わない。動いている会話・判断待ちの会話(stopWhenStuckMin があるとき)・枠で止めた会話・資源待ちの仕事・未読の報告がどれも無ければすぐ idle=true を返す(見回りを止めてよい合図)。進められる仕事が無い(どの会話も利用者の判断・承認・入力か、メモリ・CPU の空きを待っている)まま設定の stopWhenStuckMin 分(既定 120)続くと、stuck=true と待っているもの(waiting)を返す(見回りを止める合図。呼び出しをまたいで数え、状態の変化・報告・send_message・start_session・update_session で数え直す)。同時に呼べるのは1つだけ(新しい呼び出しが前のものを打ち切る)。

Input Schema

NameRequiredDescriptionDefault
waitNofalse なら待たずに、いま分かる出来事だけを返す
intervalMinNo今回だけ短くするとき(分)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.2

TDQS

A4.4/5.0
Behavior5/5

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

Far exceeds the readOnlyHint annotation: explains that no model is used while waiting, that intervalMin is capped by config, that only one call may run at a time (a new call aborts the previous), that stored state counts across calls, and that reports return immediately. These operational traits are not derivable from annotations or schema.

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

Conciseness3/5

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

All content is packed into a single dense paragraph with heavy parenthetical nesting, making it hard to scan. The opening term '見回り' (patrol) is vague before the specifics arrive, so it is not ideally front-loaded despite containing rich information.

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?

For a complex, non-obvious polling tool with no output schema, it explains the return signals (idle, stuck, waiting, timedOut, roomAvailable, todoDue, repeat) fairly thoroughly. Minor slack remains—some signals (e.g. roomAvailable/room) are only briefly glossed—but overall it is adequate to call correctly.

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 already 100%, so the baseline is 3, but the description adds real meaning: it clarifies that wait=false yields only immediately-visible events, and that intervalMin cannot exceed the configured watchIntervalMin. It doesn't reiterate defaults redundantly.

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 (waits until events occur, then returns them) applied to a well-defined resource: conversation state changes, reports, approvals/input waits, memory/quota, and TODO conditions. It also distinguishes itself from siblings by noting send_message/start_session/update_session reset the stuck counter, so an agent can separate it from the messaging/management tools.

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 clear usage context: wait=false for the desktop-app watcher polling once per event, idle=true as the signal to stop patrolling, stuck=true as the signal to stop. It also states the one-at-a-time/abort-previous rule. It does not explicitly contrast against siblings like read_reports, leaving some routing to inference.

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