Skip to main content
Glama

get_messages

Retrieve chronological messages from a Telegram chat, with optional filters for date range, sender, topic, and pagination by message ID.

Instructions

Messages from one chat in chronological order. Dates are ISO 8601 (e.g. 2026-09-01 or 2026-09-01T12:00:00Z). Use before_id/after_id (message ids) to paginate. Format: #id [date] sender (tags)\ntext.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
chat_idYes
to_dateNo
after_idNo
topic_idNo
before_idNo
from_dateNo
sender_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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?

No annotations are provided, so the description carries the behavioral disclosure burden. It adds meaningful behavioral detail: chronological ordering, ISO 8601 date format, pagination semantics, and the exact output line format. It does not explicitly state that the operation is read-only, but the description's retrieval semantics make that reasonably clear.

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 compact and front-loaded: purpose comes first, then date format, then pagination, then output format. Every sentence adds directly usable information and none is redundant with the input schema or output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core operation, ordering, pagination, and return format, and the output schema exists so return values do not need explanation. However, for an 8-parameter tool with no annotations and no schema coverage, it omits semantics for several filters (topic_id, sender_id, from_date, to_date, limit), which makes it incomplete enough for an agent need trying to use advanced filtering confidently.

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

Parameters2/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 compensate for the parameter schema's bare field names. It explains before_id/after_id as pagination keys and gives ISO 8601 formatting relevant to date parameters, but it never clarifies the semantics of topic_id, sender_id, from_date, to_date, or limit. This leaves several self-descriptive but genuinely underspecified parameters unaddressed.

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 the tool returns messages from one chat in chronological order, which is a specific verb-resource pairing with a distinct ordering guarantee. It is naturally differentiated from siblings like search_messages and message_context by emphasizing raw, per-chat chronological messages rather than search results or contextual aggregates.

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 gives explicit pagination guidance ('Use before_id/after_id (message ids) to paginate'), which is useful operational guidance. However, it does not explain when to prefer this tool over the search, semantic search, or message context alternatives, nor does it describe optional filters and when they should be used.

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