edit_message_media
Edit media content of a sent message. Update image, video, or animation via InputMedia JSON, with optional new caption.
Instructions
Edit media content of a previously sent message. Pass a JSON string as media parameter with InputMedia object.
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": {
"media": "<media>"
},
"name": "edit_message_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| media | Yes | JSON string with InputMedia object (type, media, caption, etc.) | |
| chat_id | No | Chat ID or @channel_username. Optional — defaults to log group | |
| message_id | No | ID of the message to edit (required if inline_message_id not provided) | |
| reply_markup | No | JSON string with inline keyboard markup | |
| inline_message_id | No | Inline message ID (required if chat_id/message_id not provided) |