Skip to main content
Glama

moa_tower_wait

Block until a specified tower condition is met—CI commit match, inbox messages, mission status change, or all dependencies merged—then return the payload or a retryable timeout.

Instructions

Long-poll wait primitive for the tower domain (M1), modeled on moa_board_wait / moa_wait_turn: block until the requested condition holds, then return {status:"ok", ...observed payload}; at the safety cap (default 25min, MOAMCP_WAIT_CAP_MS / timeoutMs tune it — timeoutMs is clamped to the cap) return {status:"timeout", retry:true}. wait.kind:"ci" → block until the ci/ record exists AND its commit matches the branch's CURRENT tip (a stale record from an older tip does NOT satisfy it); payload = the ci record. wait.kind:"inbox" → block until the caller's tower inbox has at least one message (same set moa_tower_inbox returns); payload = the messages. wait.kind:"mission" → block until the mission doc's status changes from what it was at call time; payload = the mission doc (a closed task scope returns {status:"closed"} instead of timing out). wait.kind:"deps" → block until EVERY mission id in mission(mission_id).deps has status "merged" — the dependency-driven parallel-dispatch primitive: all missions are dispatched at once and a dependent parks here, waking when its deps land (a successful moa_tower_merge always writes the dep mission doc, which wakes the wait); already-merged deps return immediately, an empty deps list is satisfied vacuously, and a dep id with no mission document is a protocol error (deps are validated at plan time, so a missing doc means corruption); payload = {mission_id, deps:[{id,status}...]}. Any registered roster member (tower/worker/reviewer) may wait; a delegator is rejected — delegators may only call moa_tower_send addressed to the tower.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitYesWhat to wait for. kind:"ci" needs branch; kind:"mission" needs id; kind:"deps" needs mission_id; kind:"inbox" needs nothing.
timeoutMsNoPer-call cap override (clamped to the MOAMCP_WAIT_CAP_MS safety cap)
workspaceYesThe absolute repo root (main checkout) this tower namespace anchors to. Required on every tower tool — the server cwd is never used as a fallback.
caller_agent_idYesYour engine agent id. The tower tools resolve it against the boot-registered roster (the booted tower, or a spawned worker/reviewer).
Behavior5/5

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

With no annotations, the description fully discloses behavior: it describes the long-poll blocking nature, the default 25min safety cap with clamping, per-kind payload returns, conditions for satisfaction (e.g., ci must match current tip), and special cases like empty deps being vacuously satisfied. It also states caller eligibility, leaving no behavioral surprises.

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?

Although long, the description is tightly packed with essential information and structured with semicolons and per-kind lists. It front-loads the core contract and then details each wait kind, with no filler; every sentence contributes to understanding the tool.

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

Completeness5/5

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

Given the tool's complexity (four wait kinds, nested wait object, no output schema), the description is exhaustive: it covers timing, payloads, error conditions (missing dep doc, closed task scope), caller restrictions, and references sibling tools for clarity. It leaves no meaningful gap for an agent selecting or invoking the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already includes descriptions for all 4 parameters, but the description adds substantial meaning by explaining how each wait.kind interprets its parameters (e.g., mission waits on status change, deps waits on all merged) and what the resulting payload contains. It clarifies timeoutMs clamping and workspace anchoring, going far beyond the schema field descriptions.

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 identifies the tool as a long-poll wait primitive for the tower domain, with specific verbs 'block until condition holds, then return' and differentiates it from sibling tools by referencing moa_board_wait / moa_wait_turn. It enumerates four distinct wait kinds with precise semantics, making the purpose unambiguous.

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?

It explicitly models itself on moa_board_wait / moa_wait_turn, signaling which domain it covers, and provides detailed when-to-use context for each wait kind (e.g., deps is the dependency-driven parallel-dispatch primitive). It also specifies an exclusion: delegators are rejected and may only use moa_tower_send, giving clear guidance on when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Yorha9e/moamcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server