Skip to main content
Glama
Anonymouse8882

Telegram MCP

get_messages

Retrieve historical messages from a Telegram chat. Filter by user, time range, or message IDs for paginated access.

Instructions

读取某个对话的历史消息,默认从最新往回取。

Args: chat: 对话(ID / @username / 'me')。 limit: 条数上限,最多 200。 offset_id: 从该消息 ID 之前开始取(分页用)。 min_id: 只取 ID 大于它的消息。 max_id: 只取 ID 小于它的消息。 from_user: 只看某个发送者的消息。 reverse: True 则按时间正序(从旧到新)。 topic_id: 话题群里只看某个话题(用 get_forum_topics 拿 ID)。 before: 只取该时间点之前的消息,ISO8601 / Unix 时间戳 / 相对时间(如 +0s 表示现在)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatYes
limitNo
beforeNo
max_idNo
min_idNo
reverseNo
topic_idNo
from_userNo
offset_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Despite no annotations, the description details behavior: default order (newest to oldest), pagination via offset_id/min_id/max_id, time filtering with before, user filtering, reverse order, and topic filtering. It is read-only by nature, though not explicitly stated.

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 front-loaded with purpose, followed by a clean list of arguments. Every sentence adds value with no redundancy. Length is justified by the number of parameters.

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?

Given 9 parameters and an existing output schema, the description covers all essential aspects: default behavior, pagination, filters, and time formats. Could optionally mention the return type (list of messages) but output schema covers it.

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?

With 0% schema description coverage, the description fully compensates by explaining each parameter clearly: allowed formats for chat (ID, @username, 'me'), max limit (200), pagination semantics, time format (ISO8601/Unix/relative), filtering logic, and even cross-reference to get_forum_topics for topic_id.

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 '读取某个对话的历史消息' (read historical messages of a chat), specifying the verb and resource. It distinguishes from sibling tools like search_messages, get_media_messages, and get_pinned_messages by focusing on all history.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly compare to alternatives or state when not to use this tool. Usage is implied through parameter explanations, but no direct guidance on selecting this over similar siblings.

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/Anonymouse8882/TelegamMCP'

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