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
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | ||
| tasks | No | 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. | |
| timeout | No | seconds 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. |