Skip to main content
Glama
TONresistor

Telegram MCP Server

by TONresistor

editMessageMedia

Replace or add media in existing Telegram messages with animation, audio, document, photo, or video content. Handles regular and inline messages.

Instructions

Edit animation, audio, document, photo, or video messages, or add media to text messages. If a message is part of a message album, then it can only be edited to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. Returns the edited Message on success, or True if the message is an inline message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mediaYesA JSON-serialized object for a new media content of the message. Supported types: InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo.
chat_idNoRequired if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername).
message_idNoRequired if inline_message_id is not specified. Identifier of the message to edit.
reply_markupNoA JSON-serialized object for an inline keyboard.
inline_message_idNoRequired if chat_id and message_id are not specified. Identifier of the inline message.
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. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden. It adds meaningful behavioral detail beyond the schema: album editing restrictions and the distinct return type for inline messages (True instead of Message). It does not cover permissions, ownership requirements, or irreversible replacement of old media, so it is not a 5.

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?

The description is compact and front-loaded: purpose first, then the key constraint, then the return behavior. Every sentence contributes unique information with no filler or repetition.

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?

Given a nested media object, no annotations, and no output schema, the description covers the most important behavior: supported media, album limitations, and return values. The schema handles parameter semantics. Some context is still missing, such as whether only messages sent by the bot can be edited and what happens to the original text when media is added.

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 coverage is 100%, so the baseline is 3. The description adds extra semantic context for the media parameter by defining what media types can be edited, how album membership constrains those types, and the special case of adding media to text messages—details not present in the schema itself.

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 description states a specific verb and resource: editing the media of existing messages, and explicitly lists supported media types plus the 'add media to text messages' case. This clearly differentiates it from sibling tools like editMessageText, editMessageCaption, and editMessageReplyMarkup.

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?

The description makes clear this tool is for editing media and adds album-specific constraints, but it does not explicitly contrast with sibling tools or state when to use editMessageText/editMessageCaption instead. Usage context is implied rather than explicitly delimited.

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/TONresistor/telegram-mcp'

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