Skip to main content
Glama

Recent Telegram messages

telegram_recent_messages
Read-onlyIdempotent

Catch up across the user's available Telegram chats: 'What did I miss in Telegram today?' or 'Who wrote while I was away?' Returns recent incoming and outgoing messages, newest first, with available voice/video transcripts. Default 20 results; archive maximum 200, Session maximum 50. Session samples up to 20 dialogs and reads at most 20 messages from each of up to 10 selected by latest message date within that sample. It does not inspect every chat. Connected channel inbox archives can supplement the results. Read source, coverage, partial, effective_limit and session_limit. There is no pagination or upper date bound; repeating a call does not advance. since is inclusive: yesterday includes today too. For a precise historical interval inspect relevant chats with telegram_get_messages using since and before. Do not claim complete coverage of the requested period. Use the user's known timezone; if unknown, silently use UTC without asking or adding a caveat. For today, pass local midnight as an ISO timestamp with the correct offset; distinguish calendar days from rolling 24h windows. Zero results mean none returned from this source/window, not that nobody wrote. Follow empty_reason and setup_required/history_notice when present; operational failures are not empty results. Do not reconnect a working Session or retry unchanged calls in a loop. Set since for the requested time window. Results are a bounded archive or Session slice, not a complete unread inbox; inspect an individual chat before concluding who still needs a reply. For one named conversation use telegram_find_chat and telegram_get_messages. For a name lookup miss, follow telegram_find_chat guidance: try at most 3 untried name variants before asking for an exact reference. Confirm candidates found via a changed name before reading history or sending. Messages include is_forwarded and forward_origin (original author/channel and Unix date when available). For forwards, from identifies who forwarded it in this chat, not the original author. Missing origin data does not prove authorship; never infer a hidden author's identity. Use an already connected Session where supported; preserve source, coverage and actual errors. Do not suggest connecting or reconnecting Session unless the user explicitly asks for Session setup. Never switch sender automatically or request login codes/passwords in chat.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "telegram_recent_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many messages to return. Default 20; archive maximum 200, Session maximum 50. No pagination.
sinceNoOnly messages at or after this time. Accepts an ISO 8601 timestamp, unix seconds, 'today', 'yesterday', or a relative window like '24h' / '7d'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"How many messages to return. Default 20."New value: +"How many messages to return. Default 20; archive maximum 200, Session maximum 50. No pagination."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive, yet the description adds substantive behavior the annotations cannot convey: default 20, archive max 200, Session max 50, the Session sampling algorithm (up to 20 dialogs, at most 20 messages from up to 10 chosen by latest message date), no pagination ('repeating a call does not advance'), inclusive `since` semantics, and how to read empty_reason/setup_required. It also discloses forward/forward_origin attribution caveats and auth-handling rules. Nothing contradicts the read-only annotation.

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

Conciseness3/5

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

The purpose and the key limits are front-loaded, and most sentences carry operational value, but the body is a long run-on of comma-joined clauses with no grouping, and some content duplicates the schema (default 20 / max 200 / Session 50, no pagination). A few sentences address conversational safety (login codes, reconnect advice) rather than this tool's invocation, adding length without helping selection.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and non-obvious coverage semantics, the description explains the result envelope (source, coverage, partial, effective_limit, session_limit) and the meaning of zero results, which is the critical missing piece. Field-by-field return documentation is still thin, so an agent will need to interpret those fields empirically.

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%, so the baseline is 3, but the description adds real meaning beyond the schema: `since` is inclusive so 'yesterday' also returns today, calendar days must be distinguished from rolling 24h windows, and local midnight must be sent as an ISO timestamp with the correct offset (silently UTC if unknown). It does not add syntax detail for `limit` beyond what the schema already states.

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?

Opens with a concrete verb+resource+scope ('Catch up across the user's available Telegram chats') and immediately contrasts with the sibling that handles single conversations ('For one named conversation use telegram_find_chat and telegram_get_messages'). An agent can distinguish this from telegram_get_messages, telegram_list_chats and telegram_search_messages without opening any schema.

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 routing: this tool for broad catch-up, telegram_get_messages with since/before for a precise historical interval, telegram_find_chat for a name lookup, with a bounded variant-retry rule. It also states exclusions ('It does not inspect every chat', 'no pagination or upper date bound') and what not to conclude from results.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources