Skip to main content
Glama
dikaglorya

telegram-mcp

by dikaglorya

Get chat history

telegram_get_history
Read-only

Read recent messages from a Telegram chat, newest first, and page backward using the returned offset ID to retrieve older history.

Instructions

Read recent messages from a chat. chat = @username, numeric id, or 'me'. Newest-first, max 100. The answer carries hasMore and nextOffsetId: pass that id back as offsetId to page further back. A page shorter than limit with hasMore:false means the history is exhausted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatYes
limitNo
offsetIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered. The description adds real behavioral detail beyond that: newest-first ordering, a hard cap of 100, the hasMore/nextOffsetId paging contract, and the rule that a short page with hasMore:false means exhaustion. It omits rate limits and any auth/permission caveats, which keeps it from a 5.

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?

Four tight sentences, front-loaded with the action and the identifier format, then paging mechanics, then the termination condition. No filler and no repetition of the title or name.

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?

There is no output schema, yet the description specifies the return contract an agent needs (hasMore, nextOffsetId, short-page-means-done). Combined with the 0% schema coverage on inputs, this covers everything required to call and iterate the tool correctly.

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 description coverage is 0%, so the description must carry the load and largely does: it defines accepted `chat` formats (@username, numeric id, 'me') and explains that `offsetId` is fed back from the previous response's nextOffsetId. The `limit` parameter's default and range are left to the schema, so a 4 rather than 5.

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?

States a specific verb and resource ("Read recent messages from a chat") and scopes it to recent history, which separates it from a full export. It does not name or differentiate against close siblings like telegram_search_messages, telegram_get_message, or telegram_export_history, so the agent must infer the boundary itself.

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?

Usage is implied rather than stated: the tool reads recent messages and can page backwards, which is enough to infer a bulk-recent-read use case. There is no explicit when-to-use vs. search_messages/export_history guidance and no prerequisites (e.g. needing a logged-in session or chat membership) called out.

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

Deploy Server

Other Tools