Skip to main content
Glama
TONresistor

Telegram MCP Server

by TONresistor

banChatMember

Remove a user from a group, supergroup, or channel by banning them. Requires admin rights; optionally schedule unban and revoke their messages to maintain chat safety.

Instructions

Ban a user in a group, supergroup or channel. The bot must be an administrator with the appropriate rights. Returns True on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target chat or username of the target supergroup/channel (in the format @channelusername)
user_idYesUnique identifier of the target user
until_dateNoDate when the user will be unbanned (Unix timestamp). If user is banned for more than 366 days or less than 30 seconds from the current time, they are considered banned forever. Applied for supergroups and channels only.
revoke_messagesNoPass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden, and it does meaningful work: it states the action, the permission prerequisite, and the success return value ('Returns True on success'), which is valuable since there is no output schema. It does not mention that a ban is permanent by default unless until_date is set, nor the message-deletion side effect of revoke_messages — those are left to the schema. For a no-annotation mutation tool, this exceeds the bare minimum.

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

Conciseness5/5

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

Three short sentences with zero filler: action+scope, prerequisite, and return value. The action is front-loaded, and every sentence earns its place — the return-value sentence is justified because there is no output schema. This is a model of compact, structured description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The core invocation facts are covered (what it does, where, the admin prerequisite, and the return value), and the schema fully documents parameter semantics. The clear gaps are the absence of tool-level guidance on the default-permanent ban behavior (only implied deep inside the until_date schema description) and no positioning against the large moderation sibling family (unban/restrict/banChatSenderChat). Adequate, but an agent would benefit from more orientation.

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

Parameters3/5

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

Schema description coverage is 100% — all four parameters (chat_id, user_id, until_date, revoke_messages) are individually described in the schema, including edge-case semantics like the 366-day/30-second permanent-ban rule. The description itself adds no parameter-level information. Per the rubric, baseline 3 applies when the schema does the heavy lifting.

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

Purpose5/5

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

The description states a specific verb (ban) + resource (a user) + scope (group, supergroup or channel), which fully identifies the operation. It also self-differentiates from the sibling family by action semantics: unbanChatMember is the inverse, restrictChatMember is a lesser restriction, and banChatSenderChat targets a chat rather than a user.

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

Usage Guidelines3/5

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

The description supplies a useful precondition ('The bot must be an administrator with the appropriate rights'), which tells the agent when the call can succeed. However, it gives no explicit when-to-use vs alternatives or exclusions — in a sibling list containing unbanChatMember, restrictChatMember, and banChatSenderChat, the agent must infer routing from the names alone. Usage context is present but effectively implied rather than stated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TONresistor/telegram-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server