Skip to main content
Glama
grammy-mcp
by louietyj

editMessageCaptionInline

Destructive

Edits the caption of an inline Telegram message, letting you update text, formatting, entities, or keyboard markup without resending the message.

Instructions

Use this method to edit captions of 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>"
    },
    "name": "editMessageCaptionInline"
  }
}

Input Schema

NameRequiredDescriptionDefault
captionNoNew caption of the message, 0-1024 characters after entities parsing
parse_modeNoMode for parsing entities in the message caption. See formatting options for more details.
reply_markupNoAn object for an inline keyboard
caption_entitiesNoA list of special entities that appear in the caption, which can be specified instead of parse_mode
inline_message_idYesIdentifier of the inline message
business_connection_idNoUnique identifier of the business connection on behalf of which the message to be edited was sent
show_caption_above_mediaNoPass True if the caption must be shown above the message media. Supported only for animation, photo and video messages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already flag this as a destructive, open-world write, so the description does not need to repeat that. It adds real behavioral facts beyond the annotations: the return value varies (edited Message versus True depending on whether the target is inline), and business messages lacking an inline keyboard are only editable for 48 hours. It omits permission requirements and whether an empty caption clears the caption.

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 dense sentences with no filler, and the core operation is front-loaded before the return-value and timing caveats. The clause 'if the edited message is not an inline message' is slightly awkward for a tool scoped to inline messages, but it conveys the return-type split efficiently.

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

Completeness3/5

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

For a seven-parameter mutation tool with no output schema, the description usefully covers return values and one hard constraint, which compensates for the absent output schema. Gaps remain: it does not say the message must be a media message for a caption to exist, nor whether caption removal is supported, nor what permissions are required.

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 seven parameters including caption length limits, parse_mode enums, and caption_entities are already documented in the schema. The description adds no syntax or interaction detail beyond what the schema provides; the 48-hour rule tangentially relates to business_connection_id but does not clarify that parameter's use. 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?

The description states a specific verb and resource: 'edit captions of inline messages'. The 'inline' qualifier distinguishes it from the non-inline sibling editMessageCaption, and the name mirrors the scope, so an agent can identify the operation without opening the schema. It does not explicitly name editMessageCaption as the alternative, keeping it just 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 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' scope, and the 48-hour business-message note functions as a conditional constraint. However, the description never states when to pick this over editMessageCaption or editEphemeralMessageCaption, nor does it state prerequisites such as the bot needing to have authored the message or hold edit rights.

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