Skip to main content
Glama

Edit message

edit_message
DestructiveIdempotent

Replace the text of an existing message in a Telegram chat. Only works on messages sent by the authenticated account. Cannot edit media or other message attributes — text only.

Instructions

Replace the text of an existing message in a Telegram chat. Only works on messages sent by the authenticated account. Cannot edit media or other message attributes — text only. parse_mode: classic markdown/html/auto or rich (Rich Message; dialect auto-detected). schedule_date (ISO 8601) reschedules an already-queued message; it does not turn a delivered message into a scheduled one, and the result then carries status='scheduled'. Success: dict with message_id, date, chat, text, status='edited', and edit_date (rich messages also set rich=true and rich_format). Error: dict with ok=false and error string (e.g. message not found or not editable). Use edit_message to update a previously sent message; use send_message to create new ones. Full documentation: https://github.com/leshchenko1979/fast-mcp-telegram/blob/main/docs/Tools-Reference.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesTarget chat: numeric id (e.g. -100…), username without @, or 'me' for Saved Messages.
messageYesMessage text. When sending files, used as caption.
message_idYesMessage id in this chat to edit (from get_messages or Telegram).
parse_modeNo'markdown'/'html'/'auto': classic entity formatting (auto detects). 'rich': Telegram Rich Message document; dialect auto-detected (known HTML tags outside code → rich HTML, else rich markdown). Default is 'auto'. parse_mode='rich' cannot be combined with files.auto
schedule_dateNoISO 8601 instant at which Telegram should deliver the message, e.g. '2026-10-20T09:00:00Z' or '2026-10-20T12:00:00+03:00'. Must be in the future. On send: queues the message instead of delivering now. On edit: reschedules an already-queued message.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
chatNo
codeNo
dateNo
richNo
textNo
errorNo
actionNo
paramsNo
senderNo
statusNo
topic_idNo
edit_dateNo
exceptionNo
operationNo
scheduledNo
error_codeNo
message_idNo
draft_savedNo
reply_to_idNo
rich_formatNo
reply_markupNo
schedule_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.46.1
    • addedInput schema / properties / schedule_date
      Added value: +{
      +  "default": null,
      +  "description": "ISO 8601 instant at which Telegram should deliver the message, e.g. '2026-10-20T09:00:00Z' or '2026-10-20T12:00:00+03:00'. Must be in the future. On send: queues the message instead of delivering now. On edit: reschedules an already-queued message.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "chat_id",
      -  "message_id",
      -  "message"
      -]New value: +[
      +  "chat_id",
      +  "message",
      +  "message_id"
      +]
    • addedOutput schema / properties / draft_saved
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / reply_to_id
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / schedule_date
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / scheduled
      Added value: +{
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv0.45.0
    • changedInput schema / properties / parse_mode / description
      Previous value: -"'markdown', 'html', or 'auto' (detect from content). Default is 'auto'."New value: +"'markdown'/'html'/'auto': classic entity formatting (auto detects). 'rich': Telegram Rich Message document; dialect auto-detected (known HTML tags outside code → rich HTML, else rich markdown). Default is 'auto'. parse_mode='rich' cannot be combined with files."
    • changedInput schema / properties / parse_mode / enum
      Previous value: -[
      -  "markdown",
      -  "html",
      -  "auto"
      -]New value: +[
      +  "markdown",
      +  "html",
      +  "auto",
      +  "rich"
      +]
    • addedOutput schema / properties / rich
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / rich_format
      Added value: +{
      +  "type": "string"
      +}
  3. Changed3 schema fields changedv0.36.0
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / description
      Added value: +"Return type for ``send_message`` and ``edit_message``."
    • addedOutput schema / properties
      Added value: +{
      +  "action": {
      +    "type": "string"
      +  },
      +  "chat": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "code": {
      +    "type": "integer"
      +  },
      +  "date": {
      +    "type": "string"
      +  },
      +  "edit_date": {
      +    "type": "string"
      +  },
      +  "error": {
      +    "type": "string"
      +  },
      +  "error_code": {
      +    "type": "string"
      +  },
      +  "exception": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "message_id": {
      +    "type": "integer"
      +  },
      +  "ok": {
      +    "type": "boolean"
      +  },
      +  "operation": {
      +    "type": "string"
      +  },
      +  "params": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "reply_markup": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "sender": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "status": {
      +    "type": "string"
      +  },
      +  "text": {
      +    "type": "string"
      +  },
      +  "topic_id": {
      +    "type": "integer"
      +  }
      +}
  4. First observedv0.21.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructive/idempotent/openWorld, so the bar is lower, and the description still adds real context: text-only constraint, no media edits, ownership requirement, and the non-obvious schedule_date caveat that editing a delivered message cannot make it scheduled. Error modes ('message not found or not editable') are also disclosed. Safety/authorization details are thinner than they could be.

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

Conciseness3/5

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

The purpose and constraints are front-loaded, which is good, but the description is long and spends several clauses describing success/error dict shapes that duplicate an existing output schema. Those return-value sentences and the bare documentation URL add length without new decision-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutation tool with an output schema and annotations, the description covers purpose, ownership limits, parameter caveats, sibling routing, and failure modes. Nothing an agent needs to call it correctly is missing.

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 five parameters are already documented in the schema, including the parse_mode enum values and schedule_date semantics. The description largely restates that content (rich dialect detection, rescheduling behavior) rather than adding new syntax or constraints, so it meets but does not exceed the baseline.

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 first sentence states a specific verb and resource ('Replace the text of an existing message in a Telegram chat') and immediately scopes it with ownership and text-only limits. It explicitly contrasts with send_message, so an agent can distinguish it from the closest sibling without opening 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?

It names the alternative ('use send_message to create new ones') and states when the tool is applicable (messages sent by the authenticated account, text only). It does not spell out a full when-not-to-use matrix (e.g. channel posts, bot messages), but the context is clear.

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