Skip to main content
Glama
briejhxh

codex-telegram

by briejhxh

telegram_get_messages

Read-only

Retrieve up to 100 text messages from a specified Telegram chat, with optional pagination using a message ID. Returns message content and metadata without downloading media.

Instructions

Read up to 100 messages in a known Telegram chat. The tool keeps requesting TDLib history internally when TDLib returns a partial page. Returns text and metadata only; media is not downloaded automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
chat_idYes
from_message_idNoStart before this message ID for older history

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

The readOnlyHint annotation already establishes safety, and the description adds valuable behavior beyond that: it discloses internal repeated TDLib history requests and states that media is not automatically downloaded. This gives the agent a clearer model of the tool's runtime behavior. It could add ordering or error behavior, but the key traits are covered.

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 focused sentences front-load the core purpose and then add the most important behavioral caveats. There is no fluff or repetition of schema details; every sentence earns its place.

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?

For a read-only tool with no output schema, the description covers what it returns ('text and metadata only'), its limit, and its internal pagination behavior. It is sufficiently complete for an agent to invoke correctly with chat_id and optional parameters, though exact message ordering and the meaning of a partial result are not spelled out.

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 only 33%, and only from_message_id has a schema description. The tool description adds some meaning for limit ('up to 100 messages') and chat_id ('known Telegram chat'), but does not explicitly explain optionality or how the parameters interact. It partially compensates for the low schema coverage but leaves room for more clarity.

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 specific action ('Read'), the resource ('messages'), and the scope ('up to 100 messages in a known Telegram chat'). This inherently distinguishes it from siblings like telegram_search_messages or telegram_get_chat, even though it does not name an alternative explicitly.

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 phrase 'in a known Telegram chat' implies the tool is for retrieving messages when a chat_id is already available, and not for discovery/search. However, there is no explicit when-to-use, when-not-to-use, or mention of alternative sibling tools such as telegram_search_messages.

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