Skip to main content
Glama
LoneVertex

Telegram MCP — Next Generation

List Filtered Chat Messages

list_messages
Read-onlyIdempotent

Retrieve messages from a Telegram chat with optional filters for sender, date range, or topic. Use when filtering chat history instead of simple pagination or keyword search.

Instructions

Retrieve messages from a chat matching optional filters such as sender, date range, or topic. Use when filtering chat history. For simple sequential pagination, use get_messages. For text keyword searching, use search_messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of items or records to retrieve (integer between 1 and 100).
accountNoOptional account label for multi-account environments. If omitted in single-mode, the default account is used. In multi-mode without an account, read-only tools fan out across all configured accounts.
chat_idYesTarget Telegram chat, group, supergroup, channel, or user identifier. Accepts numeric chat ID (e.g. -1001234567890 or 123456789), username (e.g. '@channel'), or phone number.
to_dateNoEnd date filter for message search in ISO 8601 format (e.g. '2026-01-31T23:59:59Z').
from_dateNoStart date filter for message search in ISO 8601 format (e.g. '2026-01-01T00:00:00Z').
search_queryNoText query string used to search and filter contacts, chats, or messages.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.1.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is fully covered. The description adds only the implicit note that pagination here differs from get_messages; it says nothing about return size, ordering, or how filters combine.

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?

Three short sentences, front-loaded with the core purpose and then the routing rules. The alternative-tool guidance is grouped at the end where an agent can act on it; no sentence is filler.

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 an output schema present and full schema coverage, the description needn't explain return values, and it correctly spends its words on tool selection. It is nearly complete for a filtered-list tool, though it omits any note on pagination mechanics or how the filters interact (AND vs OR).

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 description coverage is 100%, so all six parameters (chat_id, limit, account, from_date, to_date, search_query) are already documented in the schema — baseline 3 applies. The description's filter list only loosely overlaps the schema and adds no syntax or format detail.

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 clear verb+resource ('Retrieve messages from a chat') and explicitly distinguishes itself from get_messages and search_messages. However, it advertises filters ('sender... or topic') that do not map to any schema parameter, so part of the claimed capability is misleading.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use ('Use when filtering chat history') plus two named alternatives with the exact condition that selects each: get_messages for simple sequential pagination, search_messages for text keyword searching. Nothing is left to inference.

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