Skip to main content
Glama

hub_queue_wait

Block until new content arrives in a role's queue, then return it. Use to wait for agent updates instead of polling repeatedly.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYes
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.
Behavior5/5

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

With no annotations, the description fully carries the burden: it discloses blocking behavior, timeout return value ({changed:false}), task id handling, the obligation to report outcomes onto tasks, and the local-only deployment constraint. The timeout rationale is also transparently explained.

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 description is compact but comprehensive, with every sentence contributing essential context: the long-poll nature, return value, task edge case, deployment constraint, and usage alternative. No fluff or repetition.

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?

Even without an output schema, the description covers return values, timeout behavior, special task handling, and the correct usage scenario. It is complete for an agent to determine when and how to invoke this tool.

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?

The description adds meaning to the 'role' parameter by explaining it as the queue's subject ('role's queue'), which the schema lacks. The 'timeout' parameter is already well-described in the schema, so the description appropriately references it without redundancy. This compensates for the 50% schema coverage.

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 states the tool blocks until new content arrives in a specified role's queue and returns it, describing it as a 'real long-poll, not a snapshot you have to re-poll.' This verb+resource+mechanism structure distinguishes it from sibling tools like hub_queue_send and hub_queue_wait_all.

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?

Explicit guidance says 'Use this instead of a sleep-and-recheck loop when waiting on an agent to report back via hub_queue_send,' and notes the local/stdio-only availability. It also references hub_queue_send for task semantics, giving clear context on when to choose 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/bzdOS/hubd'

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