Skip to main content
Glama
grammy-mcp
by louietyj

editMessageTextInline

Destructive

Edits the text or rich content of an inline Telegram message by inline message ID, with optional entities, parse mode, link previews, and inline keyboard markup.

Instructions

Use this method to edit text, rich and game inline messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inline_message_id": "<inline_message_id>",
      "text_or_rich_message": "<text_or_rich_message>"
    },
    "name": "editMessageTextInline"
  }
}

Input Schema

NameRequiredDescriptionDefault
entitiesNoA list of special entities that appear in message text, which can be specified instead of parse_mode
parse_modeNoMode for parsing entities in the message text. See formatting options for more details.
reply_markupNoAn object for an inline keyboard
inline_message_idYesIdentifier of the inline message
link_preview_optionsNoLink preview generation options for the message
text_or_rich_messageYesNew text or rich content of the message, a string maps to the `text` parameter and an object maps to the `rich_message` parameter
business_connection_idNoUnique identifier of the business connection on behalf of which the message to be edited was sent

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag a mutating, open-world, destructive operation, so the description's main added value is the return-shape contract: an edited Message object when the target is not an inline message, otherwise True. It also discloses a real behavioral constraint (business messages not sent by the bot and lacking an inline keyboard are editable only within 48 hours), which agents cannot get from the annotations.

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 sentences, front-loaded with the purpose, then the return value, then the caveat. The middle sentence about non-inline messages is boilerplate inherited from the generic tool and is mostly dead weight here since inline_message_id is required, but overall it is compact and readable.

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 no output schema, the description usefully explains both possible return values, and it covers the key 48-hour business-message restriction. Gaps remain for a 7-parameter, nested-object mutation tool: failure modes (message not found, too old to edit, permission issues) and the interaction between text, entities, and parse_mode are not addressed.

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 description coverage is 100%, including the anyOf disambiguation for text_or_rich_message and the parse_mode enum, so the baseline is satisfied without the description duplicating field docs. The note about editing rich messages adds conceptual scope, but the description does not discuss the interplay between entities and parse_mode or the business_connection_id implications.

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 ("edit") and resource ("text, rich and game inline messages"), which is enough for an agent to know it mutates the text content of an inline message. However, it reuses generic editMessageText boilerplate about non-inline messages and even claims to edit "game" messages, which muddies the scope of an inline-only tool whose schema requires inline_message_id.

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?

Usage is implied by the "inline messages" wording, and the schema's required inline_message_id reinforces that this is the inline counterpart of editMessageText. But there is no explicit when/when-not guidance, no mention of editMessageCaptionInline or editMessageMediaInline as alternatives for other content types, and no statement that this tool applies only to messages previously sent via the bot's inline mode.

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

Deploy Server

Other Tools