Skip to main content
Glama
telegram-mcp-connector

telegram-mcp-connector

by nitatsuu

Get Messages

get_messages
Read-only

Read messages from a Telegram chat in oldest-to-newest order and filter by date range or sender, with paging to older messages.

Instructions

Read the latest messages of a chat, returned oldest to newest. If older_messages_before_id is present, pass it as before_id to page back.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chat": "<chat>"
    },
    "name": "get_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesChat id, @username, t.me link, "me", or chat title
limitNo
sinceNoOnly messages at or after this date/time
untilNoOnly messages before this date/time
before_idNoOnly messages older than this id (pagination)
from_userNoOnly messages from this sender

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds behavior the annotations cannot convey: results are ordered oldest to newest and pagination is driven by an id surfaced in the response, which is exactly the operational detail an agent needs to loop correctly.

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, each doing a distinct job: the first defines scope and ordering, the second gives the pagination recipe. No filler and the essential contract is front-loaded.

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?

An output schema exists, so return values need not be explained, and the description covers ordering plus the paging loop that an agent would otherwise have to reverse-engineer from the response. What's missing is minor: whether `limit` counts from the newest message and any note on chat identifier resolution or access constraints.

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 83%, so the schema already documents chat, since, until, before_id, from_user, and limit bounds — baseline 3 applies. The description clarifies before_id as the page-back cursor sourced from `older_messages_before_id`, a marginal addition over the schema's own "(pagination)" note, but it says nothing about limit interacting with the newest-N semantics.

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 states a specific verb and resource ("Read the latest messages of a chat") plus the ordering contract ("oldest to newest"), which an agent can act on immediately. It does not distinguish itself from siblings like search_messages, get_unread, or get_message_context, so the agent must infer when a recent-history read is preferred over a filtered search or an unread query.

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?

It gives real usage guidance for one case: how to page backwards using the returned `older_messages_before_id` as `before_id`. It says nothing about when to choose this over search_messages or get_unread, nor about prerequisites such as chat resolution or access limits, so guidance is implied rather than comparative.

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