Skip to main content
Glama
germankingerman-byte

Telegram MCP Server

Edit Telegram Message

telegram_edit_message_text
Idempotent

Edit the text of a previously sent bot message in Telegram. Provide the chat ID, message ID, and new text to update the content.

Instructions

Edit the text of a previously sent bot message.

Only messages sent by this bot can be edited, and only if they were sent less than 48 hours ago.

Args:

  • chat_id (string | number): Chat containing the message

  • message_id (number): ID of the message to edit

  • text (string): Replacement text, 1-4096 characters

  • parse_mode ('Markdown' | 'MarkdownV2' | 'HTML' | 'none'): Text formatting (default: 'none')

Returns: Confirmation that the message was updated.

Error Handling:

  • "message to edit not found" -> wrong chat_id/message_id, or the message is older than 48 hours.

  • "message is not modified" -> the new text is identical to the current text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesNew text for the message
chat_idYesTarget chat. Use a numeric chat ID (e.g. 123456789 for a user, -1001234567890 for a supergroup/channel) or a public channel username with a leading '@' (e.g. '@my_channel'). If unknown, call telegram_get_updates after the user messages the bot to discover it.
message_idYesID of the message to edit (returned by telegram_send_message)
parse_modeNoText formatting mode. 'HTML' supports <b>, <i>, <a href>, <code>, <pre>. 'MarkdownV2' requires escaping special characters (_*[]()~`>#+-=|{}.!) with a backslash. 'none' sends plain text.none
Behavior5/5

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

Description goes beyond annotations by disclosing the 48-hour time constraint, the bot-ownership requirement, and error handling details. Annotations indicate idempotentHint=true but description explains the 'message is not modified' error, adding behavioral context.

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?

Description is well-structured with a clear overview, constraints, Args list, Returns, and Error Handling sections. Every sentence provides value, no fluff, and the most critical info is front-loaded.

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 4-parameter tool with no output schema, description covers purpose, constraints, and error handling. Not specifying exact return fields is a minor gap, but 'Confirmation that the message was updated' is adequate given simplicity.

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?

With 100% schema description coverage, the baseline is 3. The description partly repeats schema but adds minor value, such as character limits for text and formatting explanations for parse_mode. No significant new meaning beyond schema.

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?

Description clearly states 'Edit the text of a previously sent bot message.' The verb 'edit' and resource 'text of a previously sent bot message' are specific. It distinguishes from siblings like telegram_send_message (send new) and telegram_delete_message (delete).

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?

Description specifies that only messages sent by this bot and younger than 48 hours can be edited, providing clear context. Error handling gives situations when it won't work. However, it does not explicitly name alternative tools for when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/germankingerman-byte/telegram-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server