Problem
The bot can send, edit, and delete messages but has no way to pin them. This is useful for:
- Pinning weekly digest posts so they're visible at the top of the group
- Pinning important announcements or reminders
- Any recurring content the operator wants persistent visibility for
Currently a group admin has to pin messages manually after the bot posts them.
Proposed solution
Add a pin_message(chat_id, message_id) MCP tool:
pin_message(chat_id: int, message_id: int, disable_notification: bool = True) -> None
Calls Telegram's pinChatMessage API. Requires the bot to have admin rights with the "Pin Messages" permission in the target group.
Also consider a matching unpin_message(chat_id, message_id) and unpin_all_messages(chat_id) for completeness.
Use case that prompted this
Weekly trend-digest posts fired via a recurring reminder — the bot posts the digest but can't pin it. An admin currently has to pin it manually each Monday.
Notes
- Bot needs to be promoted to admin with pin permission in each group where this is used
disable_notification=True default avoids spamming users with a "message was pinned" notification on every digest
- Should be listed in
--allowedTools like other messaging tools
- Low risk — pinning is reversible
Requested by
Muhammadjon (group member), approved by Rustam (owner).
Problem
The bot can send, edit, and delete messages but has no way to pin them. This is useful for:
Currently a group admin has to pin messages manually after the bot posts them.
Proposed solution
Add a
pin_message(chat_id, message_id)MCP tool:Calls Telegram's
pinChatMessageAPI. Requires the bot to have admin rights with the "Pin Messages" permission in the target group.Also consider a matching
unpin_message(chat_id, message_id)andunpin_all_messages(chat_id)for completeness.Use case that prompted this
Weekly trend-digest posts fired via a recurring reminder — the bot posts the digest but can't pin it. An admin currently has to pin it manually each Monday.
Notes
disable_notification=Truedefault avoids spamming users with a "message was pinned" notification on every digest--allowedToolslike other messaging toolsRequested by
Muhammadjon (group member), approved by Rustam (owner).