group_moderate
Run ONE moderation action on a group the connected account administers (Telegram bot groups today).
Actions:
invite_link: mint a fresh invite link; older links stay valid. Optional params: name, member_limit, expire_date, creates_join_request
revoke_invite_link: params: invite_link
admins: list administrators (user_id, username, name, status)
member_count: how many members the group has
member_status: one member's status. params: user_id
promote / demote: params: user_id, optional rights {can_*: bool}
ban / unban: params: user_id, optional revoke_messages
mute / unmute: params: user_id, optional until_date (unix ts)
pin / unpin: params: message_id (omit on unpin for the latest), optional silent
set_title: params: title
set_description: params: description
⚠️ A Telegram BOT cannot add a member or create a group — the Bot API has no method for either. To bring someone in, mint an invite_link and send it to them.
Telegram rules that surprise callers (all verified against a live group):
A bot may only promote/demote admins IT promoted. Check
can_be_editedin member_status first: false means demote will answer 'not enough rights', and that is Telegram, not a failure on our side.promote additionally needs the bot to hold can_promote_members in the group; plain admin rights are not enough.
After unmute the status stays 'restricted' while every can_send_* is true. That is Telegram labelling anyone who carries an explicit permission set — it does NOT mean still muted. Read the permissions, not the status.
unban lifts the ban but does not bring the person back: the status becomes 'left' and they must rejoin.
Returns: success plus the action's own keys (invite_link, admins, member_count, status) and result, Telegram's own payload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Which action to run (see the tool description for the list) | |
| params | No | Action-specific arguments, e.g. {'user_id': 123} for promote/ban, {'message_id': '456'} for pin, {'title': '...'} for set_title | |
| channel | Yes | Channel the group lives on, e.g. 'telegram_bot' | |
| chat_id | Yes | Group to act on: the platform chat id (e.g. -1004487018858), a channel_ref, or our numeric DB thread id | |
| in_workspace | No | Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected. |