Skip to main content
Glama
draiqw

telegram-mcp

by draiqw

tg_wait

Wait for a matching Telegram message in a chat and return it. Use to pause until a reply arrives, without polling; returns false on timeout.

Instructions

Block until a matching message arrives, then return it.

This is the right way to "wait for their reply" — the daemon is already listening to Telegram, so waiting costs nothing and misses nothing. Do not poll tg_events in a loop instead.

Returns got=false on timeout; that means nothing arrived, not that something failed.

Args: chat: only messages in this chat (id, @username or exact title). from_user: only messages from this person (id, @username or name). keyword: only messages whose text contains this. timeout: seconds to wait, 5 to 600. private_only: ignore groups and channels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNo
keywordNo
timeoutNo
from_userNo
private_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, description carries the burden. It discloses blocking behavior, timeout result meaning, and that the daemon already listens, so waiting is cheap. Doesn't detail potential errors or side effects, but sufficient for the tool's purpose.

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?

Description is efficient: two opening sentences, a note on timeout semantics, and a bullet list of args. Every sentence adds value; no fluff.

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?

With output schema covering return value, the description covers blocking behavior, matching criteria, timeout, and usage guidance over polling. A complete picture for an agent to select and invoke correctly.

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

Parameters5/5

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

Despite 0% schema coverage, the description explains all 5 parameters with accepted formats (id, @username, exact title) and semantics (private_only ignores groups/channels, timeout range 5-600). Fully compensates for schema lack.

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?

Clearly states the tool blocks until a matching message arrives and returns it. Distinguishes from polling tg_events by framing as 'the right way to wait for their reply.'

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 instructs when to use (waiting for a reply) and what not to do (do not poll tg_events in a loop). Also clarifies timeout semantics (got=false means nothing arrived, not failure).

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/draiqw/telegram-mcp'

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