Skip to main content
Glama
electricessence

Telegram Bridge MCP

dequeue

Drain queued updates from a Telegram session: processes non-content events first, then appends up to one content event. Blocking wait returns updates or timed_out; instant poll returns pending flag.

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".
Behavior4/5

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

With no annotations, the description fully carries behavioral disclosure. It explains drain order (non-content first, then up to one content event), response variants, blocking vs. non-blocking, default wait source, and duplicate detection via connection_token. However, it omits discussion of rate limits, idempotency, or whether the tool has side effects beyond consuming. Still highly transparent.

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 verbose but every clause adds necessary detail for correct invocation. It is front-loaded with the core purpose. Some repetition exists (e.g., 'pending > 0 → call again' mentioned twice in different contexts), but overall it balances completeness with readability.

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 no output schema, the description thoroughly documents all return shapes (updates, pending?, timed_out, error) and their triggers. It also covers edge cases (instant polls, session_closed, default wait override) and connects to sibling tool 'action' for profile default. The only gap is lack of explicit mention of response_format output change, but 'compact' is inferred from param description. Overall complete.

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?

Schema coverage is 100%, but the description adds valuable context beyond schema descriptions. It explains the fallback for max_wait (300s from profile default), the role of force: true, the session token requirement (implied by token param), and connection_token for duplicate detection. This enriches the schema with practical usage scenarios, elevating it above baseline.

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 opens with a specific verb and resource: 'Consume queued updates.' It then details the queue drain order and response types, clearly distinguishing from sibling tools like 'send' (which would produce updates) and 'action' (which controls profile/sessions). The purpose is unambiguous and well-differentiated.

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?

Provides explicit guidance on when to call the tool again (pending > 0, timed_out), how to use instant polls (max_wait: 0), what to do on session_closed (stop looping), and how to handle default wait and overriding. Also directs to help(topic: 'dequeue') for more details. All usage contexts are covered with clear instructions.

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

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