Skip to main content
Glama
draiqw

telegram-mcp

by draiqw

tg_history

Fetch Telegram chat messages chronologically, with optional filters for sender, text, topic, and pagination.

Instructions

Read messages from one chat, oldest to newest.

Args: chat: chat id, @username, t.me link, exact title, or "me" for Saved Messages. limit: number of messages. before_id: paginate to messages older than this message id. from_user: only messages from this person. search: only messages containing this text. topic: read one forum topic instead of the whole chat (id from tg_topics).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatYes
limitNo
topicNo
searchNo
before_idNo
from_userNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosure. It clearly indicates a read-only operation via 'Read messages' and explains ordering (oldest to newest) and filtering behaviors. It does not explicitly state 'does not modify anything,' but the verb choice makes this apparent, and it adds useful detail on pagination and filters.

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 a compact docstring with a one-sentence summary followed by a bulleted argument list. Each line adds value, with no fluff or repetition. The purpose is front-loaded, and the structure is easy to scan.

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?

Despite having six parameters, no annotations, and only an output schema, the description covers all essential aspects: purpose, ordering, pagination, filtering, and chat identification. It is complete enough for an agent to invoke the tool correctly without needing additional context.

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?

Schema description coverage is 0%, so the description is the sole source of parameter meaning. It thoroughly explains every parameter: chat accepts multiple formats (@username, t.me link, etc.), limit sets count, before_id enables pagination, from_user filters by user, search filters by text, and topic scopes to a forum topic. This substantially exceeds what the schema provides.

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 'Read messages from one chat, oldest to newest,' which specifies the action, resource, and ordering. This clearly distinguishes it from siblings like tg_search (which searches across chats) and tg_mentions (which focuses on mentions), making the purpose unambiguous.

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?

The description provides clear context: it reads messages from a single chat with options for pagination, filtering, and topics. However, it does not explicitly mention alternatives or state when not to use this tool, so it lacks explicit exclusions but still gives strong contextual guidance.

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