Skip to main content
Glama

dequeue

Poll for queued updates: drain non-content events, then append one content event. Supports blocking wait up to 300 s or instant non-blocking poll.

Instructions

Consume queued updates. Non-content events drain first, then up to one content event (text, media, voice) is appended. Returns: { updates, pending? } with data; { timed_out: true } on blocking-wait expiry (call again immediately); { pending? } for instant polls (max_wait: 0); { error: "session_closed", message } (isError: false) when the session queue is gone — stop looping. pending > 0 → call again. Omit max_wait to use session default (action(type: 'profile/dequeue-default'), fallback 300 s); max explicit: 300 s. Pass connection_token (from session/start) to enable duplicate-session detection — the bridge alerts the governor if two callers share the same identity. Call help(topic: 'dequeue') for details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_waitNoSeconds to block when queue is empty. Omit to use your session default (fallback 300 s). Pass 0 for an instant non-blocking poll (drain loops). Values above the session default require force: true. Use action(type: 'profile/dequeue-default') to raise your default.
timeoutNoDeprecated alias for max_wait. Use max_wait instead.
forceNoPass true to allow a one-time override when max_wait exceeds your current session default. Only applies to values ≤ 300 s (the hard cap on max_wait). To wait longer than 300 s by default, use action(type: 'profile/dequeue-default') instead.
tokenNoSession token from action(type: 'session/start'). Required for all paths except session/start, session/reconnect, and unauthenticated `session/list` probe — pass your token on every other tool call.
connection_tokenNoUUID returned by session/start. Pass on every dequeue call to enable duplicate-session detection. The bridge alerts the governor (without rejecting the call) if two agents share the same SID but present different connection tokens.
response_formatNoResponse format. "compact" only suppresses `empty: true` (inferrable from the caller's use of `max_wait: 0`); `timed_out: true` is always emitted regardless of compact mode. Defaults to "default".
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It details the order of event draining, all possible return shapes (updates, pending, timed_out, error), default wait behavior, hard cap, force override, and duplicate-session detection. No contradictions with annotations (none exist).

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

Conciseness4/5

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

The description is front-loaded with the core purpose and return types, followed by detailed but necessary behavioral notes. It is dense with information yet remains clear. Minor redundancy (e.g., mentioning 'call again' multiple times) could be trimmed, but overall it is well-structured and efficient.

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 (6 parameters, no output schema, no annotations), the description covers all aspects: return types, error handling, default values, alternative actions, and optional features. It is comprehensive enough for an AI agent to understand and invoke the tool correctly without needing external references.

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?

Although the schema already has 100% coverage, the description adds significant context beyond the schema: the meaning of max_wait omission (session default), the fallback value, the force parameter's relationship to the default, the purpose of connection_token for duplicate detection, and the effect of response_format. This extra value justifies a score above the baseline of 3.

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's action ('Consume queued updates') and the resource ('queued updates'), with specific detail on event processing order (non-content events first, then up to one content event). It is easily distinguished from sibling tools like action, help, and send.

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?

The description provides explicit guidance on when to call again (pending > 0), when to stop (session_closed error), and how to raise the default wait via action(type: 'profile/dequeue-default'). It also directs users to call help(topic: 'dequeue') for more details, covering both usage and alternatives.

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/electrified-cortex/Telegram-Bridge-MCP'

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