Skip to main content
Glama

hub_queue_wait

Blocks until new content arrives in a role's queue, then returns it. Use this long-poll instead of sleep-and-recheck loops when waiting for an agent to report back.

Instructions

Block until new content lands in 's queue (this node's file plus any mesh-synced peer files for that role), then return it — a real long-poll, not a snapshot you have to re-poll. Returns {changed:false} if nothing arrives within timeout. If a delivered block names a task (see hub_queue_send), the ids come back as tasks — report the outcome onto those tasks, or the message is the only place the blocker ever existed. Local/stdio only (not available on the shared HTTP server). Use this instead of a sleep-and-recheck loop when waiting on an agent to report back via hub_queue_send.

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": {
      "role": "<role>"
    },
    "name": "hub_queue_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleYes
tasksNowork mode: also return `work` — your open, ready tasks, most urgent first, each with its claim and the latest messages about it — and wake as soon as one is offered (ready, not started). Start one with hub_claim({task, agent, ttlMin}); a lapsed claim offers it again, so a turn that did nothing loses nothing. Messages about a task that is already closed are held back (`skipped`): cancelling is closing.
timeoutNoseconds to block, default 45, max 540. The default is deliberately short: MCP clients abort a tool call on their own timeout (commonly ~60s) and hubd cannot see that limit. Raise it only if you know your client tolerates a longer call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.88
    • addedInput schema / properties / tasks
      Added value: +{
      +  "description": "work mode: also return `work` — your open, ready tasks, most urgent first, each with its claim and the latest messages about it — and wake as soon as one is offered (ready, not started). Start one with hub_claim({task, agent, ttlMin}); a lapsed claim offers it again, so a turn that did nothing loses nothing. Messages about a task that is already closed are held back (`skipped`): cancelling is closing.",
      +  "type": "boolean"
      +}
  2. Addedv0.5.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and discloses that this is a real long-poll, returns {changed:false} on timeout, covers mesh-synced peer files, and requires reporting outcomes onto named tasks. It does not clarify whether returned queue content is consumed or requires acknowledgement, which matters for a queue-wait tool.

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?

The definition is front-loaded around the blocking behavior and uses each sentence for a distinct purpose: explaining the long-poll, timeout return, task reporting requirement, local-only availability, and intended alternative. There is no redundant restatement.

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 three-parameter wait tool with no output schema, the description explains the key return cases, task-reporting obligation, and runtime restrictions. It is nearly complete, though the interaction between the `tasks` parameter and returned task ids could be clearer.

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

Parameters3/5

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

Schema coverage is 67%, so the schema already documents the timeout and the boolean tasks work-mode parameter in detail. The description adds some context about role queueing and task-bearing returns, but it never explains the tasks boolean parameter and risks confusing the returned `tasks` field with that parameter.

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 new content lands in a role's queue, including the node file and mesh-synced peer files. It distinguishes this from a snapshot/re-poll pattern and names hub_queue_send as the source of task-bearing messages.

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?

Explicitly says to use this instead of a sleep-and-recheck loop when waiting on an agent to report back via hub_queue_send. It also gives an availability constraint: local/stdio only, not the shared HTTP server.

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