Skip to main content
Glama

get_messages

Retrieve specific Telegram messages by ID, or fetch the surrounding conversation with context. Read-only; deleted or inaccessible IDs are simply absent.

Instructions

Fetch specific messages by id, or the conversation around one — use around with context to see what a search hit was replying to. Deleted or inaccessible ids are simply absent from the result. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsNoExplicit message ids, at most 200.
chatYes@username, t.me link, or numeric id from list_chats.
aroundNoCentre the window on this message id instead.
contextNoMessages either side of `around`. Default 5, max 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are present, so the description carries the full burden. It explicitly states 'Read-only' and discloses absent-id behavior ('Deleted or inaccessible ids are simply absent from the result'). These go beyond the schema and add useful operational knowledge. It does not mention auth or rate limits, but for a simple read tool these two disclosures are reasonably complete.

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 earning its place: the first defines the purpose and use case, the second discloses behavior and safety. The key points are front-loaded and there is zero filler.

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?

For a tool with 4 parameters and no output schema, the description covers purpose and some behavior, but it does not specify what the result looks like or how to handle ambiguous inputs (e.g., if both 'ids' and 'around' are provided, or if neither is provided beyond the required 'chat'). These gaps could cause an agent to call it incorrectly, so it is adequate but not complete.

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 coverage is 100%, so the baseline is 3. The description adds meaning to 'around' and 'context' by explaining their purpose ('see what a search hit was replying to'), and it clarifies 'ids' behavior with the absent-ids note. This is more than the schema provides and helps the agent understand parameter intent.

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 states a specific verb and resource ('Fetch specific messages by id') and immediately contrasts it with a conversation-window mode ('or the conversation around one'). It also ties the 'around' usage to a search-message context, which clearly differentiates it from sibling tools like read_chat or search_messages without needing to open their schemas.

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

Usage Guidelines4/5

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

The description gives a concrete scenario: 'use `around` with `context` to see what a search hit was replying to.' This tells the agent when to use the tool (following up on a search result). It does not explicitly list exclusions or alternative names, but the 'specific messages' framing implies it is not for bulk reading, so context is clear.

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