Skip to main content
Glama

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_edited in 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

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich action to run (see the tool description for the list)
paramsNoAction-specific arguments, e.g. {'user_id': 123} for promote/ban, {'message_id': '456'} for pin, {'title': '...'} for set_title
channelYesChannel the group lives on, e.g. 'telegram_bot'
chat_idYesGroup to act on: the platform chat id (e.g. -1004487018858), a channel_ref, or our numeric DB thread id
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Far beyond the annotations: it discloses that old invite links stay valid, that revoke/pin/unpin mutate state, that unban leaves the user 'left' and they must rejoin, and that post-unmute status reads 'restricted' even though all can_send_* are true. It also flags the hard limitation that a bot cannot add members or create groups at all, which is exactly the kind of surprise a caller needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose, then a scannable action list, then caveats, then the return shape. Every bullet carries concrete information, though the density of caveats makes it on the long side for a tool an agent must parse on every call.

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?

With no output schema, the description closes the loop by naming the returned keys (invite_link, admins, member_count, status, result). It is complete for correct invocation, but the missing steer away from the narrower sibling moderation tools leaves a tool-selection gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the five top-level params, so the baseline would be 3; but the description carries meaning the schema cannot, since `action` has no enum and the schema only says 'see the tool description'. The bullet list supplies every valid action value and its action-specific `params` keys (user_id, message_id, title, rights, revoke_messages, until_date, member_limit, expire_date).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb+resource ('Run ONE moderation action on a group the connected account administers') and enumerates every supported action with its parameters, so the scope is unambiguous. It does not, however, differentiate itself from overlapping siblings such as group_promote_admin, group_admins, and group_get_invite_link, which cover a subset of the same actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives real preconditions per action, e.g. 'Check `can_be_edited` in member_status first' and 'promote additionally needs the bot to hold can_promote_members', which tells the agent when an action will fail. It never states when to choose this dispatcher over the narrower sibling tools, so the alternative-selection guidance is absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.