Telegram Delete Message
telegram_delete_messageDeletes ONE message you sent in a Telegram private chat or basic group, for everyone, only after the receiver acknowledged it: the receiver must have replied to that exact message with the text ACK (a human in the Telegram app, or an agent with telegram_send_message reply_to_message_id). DESTRUCTIVE, with a preview: confirm=false (the default) checks the ACK and deletes NOTHING; show the preview to the user and call again with confirm=true and the same account only after they approve. The confirm checks everything again. Reading the chat, unread=0 or any text never count as an ACK. The ACK proves that another Telegram account replied, not that it is another person; an account linked in this LMCP is never accepted as the receiver, so each computer with agents needs its own Telegram account. In a basic group the ACK proves that the user you named as receiver replied, not that the message was meant for them: the receiver is whoever you name. Supergroups and channels are not supported. state deleted means the message no longer exists in this account (requested for everyone); unknown means it may have been deleted, so call again and the answer will be deleted or not_found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Which linked Telegram account to use: its label or id from telegram_list_accounts. Leave it out to use the default account. | |
| chat_id | Yes | Chat id from telegram_list_chats: user:… (private) or chat:… (basic group). | |
| confirm | No | Must be true to delete. Without it, returns a preview and deletes nothing. | |
| receiver | Yes | The receiver's user:<id>:<hash> id from telegram_list_chats. Only this user's ACK counts. | |
| remember | No | With confirm: true, also stop asking for this kind of action from now on. Only when the person said so ("don't ask again"). The person can revoke it in LMCP or with set_always_allowed. | |
| message_id | Yes | Id of your own message to delete (from telegram_read_messages). | |
| ack_message_id | Yes | Id of the receiver's reply ACK to that message (from telegram_read_messages). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||