Skip to main content
Glama
Telegram MCP

Telegram MCP

by aminkh17

Read chat history

get_messages
Read-only

Read recent messages from an allowlisted Telegram chat, oldest first, and paginate older history by passing the prior nextBeforeMessageId as beforeMessageId.

Instructions

Read recent messages from one allowlisted chat, oldest first. Paginate older messages by passing the previous nextBeforeMessageId as beforeMessageId.

Input Schema

NameRequiredDescriptionDefault
chatYesAllowlisted chat: @username, t.me link, numeric id, or exact title.
limitNoNumber of messages to return (default from config).
sinceDateNoOnly return messages at or after this ISO date or Unix timestamp in seconds.
beforeMessageIdNoReturn messages older than this message id. Use nextBeforeMessageId from a previous call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish this as a safe read (readOnlyHint) against an open system (openWorldHint). The description adds meaningful behavior beyond that: results are ordered oldest first and paging is backward-only via a cursor, which shapes how an agent must consume the results. It does not state what the response contains (notably whether nextBeforeMessageId is returned) or what happens for a non-allowlisted chat.

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?

Two sentences, zero waste. Scope and ordering come first, then the paging mechanic, which is the order an agent needs them.

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?

With no output schema, the description should ideally confirm that the response carries nextBeforeMessageId, since the whole pagination workflow depends on it. Otherwise it covers scope, ordering, and paging adequately for a small read-only tool whose parameters are fully documented.

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

Parameters3/5

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

Schema coverage is 100%, with chat formats, limit bounds, sinceDate formats, and the beforeMessageId cursor all documented inline. The description's pagination sentence restates what the schema already says about nextBeforeMessageId, so it adds little parameter meaning beyond the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource (read messages), scopes it to one allowlisted chat, and states the ordering (oldest first). It is clearly distinct from get_message (single message) and search_messages (query-driven), though it never names those siblings explicitly.

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

Usage Guidelines4/5

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

Context is clear: use for recent history of a single allowlisted chat, and use the beforeMessageId/nextBeforeMessageId loop to walk backwards. There is no explicit routing statement about when to prefer search_messages or get_message instead, so the guidance stops short of full when/when-not coverage.

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