Skip to main content
Glama
grammy-mcp
by louietyj

editMessageReplyMarkup

Destructive

Updates the inline keyboard attached to a Telegram message by chat and message ID, leaving the message content unchanged.

Instructions

Use this method to edit only the reply markup of 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": {
      "chat_id": "<chat_id>",
      "message_id": "<message_id>"
    },
    "name": "editMessageReplyMarkup"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target chat or username of the target bot, supergroup or channel in the format `@username`
message_idYesIdentifier of the message to edit
reply_markupNoAn object for an inline keyboard.
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 declare destructiveHint=true and openWorldHint=true, so the description isn't carrying the safety burden. It does add genuine context beyond annotations: the conditional return type (Message vs True for inline messages) and the 48-hour editing window for business messages lacking an inline keyboard. It stops short of saying what happens if reply_markup is omitted or how permissions are enforced.

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?

Three sentences, each carrying distinct information: purpose, return behavior, and an edge-case constraint. Purpose is front-loaded and there is no filler.

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 mutation tool with full schema coverage and no output schema, the description covers the essentials: scope, return shape, and the most consequential edge case. It could mention the inline/ephemeral variants it competes with and the keyboard-clearing behavior, but nothing critical 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 four parameters are documented in the schema itself, establishing the baseline of 3. The description adds no parameter-level detail — notably nothing about the semantics of passing an empty or absent reply_markup to clear an existing keyboard.

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 and a narrowly scoped resource: 'edit only the reply markup of messages.' The word 'only' is the key discriminator against editMessageText/editMessageCaption siblings. It does not, however, distinguish itself from editMessageReplyMarkupInline or editEphemeralMessageReplyMarkup, which look like near-identical siblings.

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 'edit only the reply markup' (use when changing the keyboard, not the content), and one exclusionary condition is given for business messages that weren't sent by the bot. There is no explicit statement of when to prefer this over the Inline or Ephemeral variants, which is the main ambiguity an agent would face.

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