Skip to main content
Glama
LoneVertex

Telegram MCP — Next Generation

Get Context Window Around Message

get_message_context
Read-onlyIdempotent

Retrieve messages before and after a target Telegram message ID to understand conversational context around a specific event, quote, or reply. Read-only.

Instructions

Retrieve a surrounding window of messages before and after a target message ID in a chat. Use when understanding conversational context around a specific event or quote. Read-only operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
message_idYesUnique integer ID of the target message within the specified chat.
context_sizeNoNumber of surrounding messages before and after target message to include for context.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.1.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint, so the 'Read-only operation' sentence adds nothing new and is effectively a restatement. The description does disclose the symmetric before/after window behavior, but omits any note on prerequisites (cached chat, valid message ID) or fan-out semantics. Adequate but thin against an annotation-rich tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with purpose, usage and safety front-loaded in that order. The trailing 'Read-only operation' duplicates the annotation and is mildly wasteful, but overall it is tight.

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 a 100%-covered schema and an output schema present, the description need not explain parameters or return values. It covers what it is and when to use it, leaving only minor behavioral gaps (prerequisites, multi-account fan-out) unstated.

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 chat_id, message_id, context_size and account are all documented in the schema. The description only alludes to 'target message ID' and the 'surrounding window', adding no syntax, format or default detail beyond the schema. Baseline 3 applies.

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 specific verb (Retrieve) and resource (a surrounding window of messages before and after a target message ID in a chat), which cleanly distinguishes it from the many list/search siblings like get_messages and list_messages. It does not, however, name any sibling explicitly to sharpen that boundary, so it stops short of a 5.

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?

Provides a clear usage condition: 'Use when understanding conversational context around a specific event or quote.' That tells the agent when this tool is the right pick over a plain history fetch, but it names no alternatives and gives no exclusions, so 4 rather than 5.

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