Skip to main content
Glama
TONresistor

Telegram MCP Server

by TONresistor

restrictChatMember

Restrict a user in a supergroup by adjusting their permissions. Lift restrictions by passing True for all permissions; requires admin can_restrict_members rights. Returns True on success.

Instructions

Restrict a user in a supergroup. The bot must be an administrator with can_restrict_members rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
user_idYesUnique identifier of the target user
until_dateNoDate when restrictions will be lifted for the user (Unix timestamp). If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered restricted forever.
permissionsYesA JSON-serialized object for new user permissions
use_independent_chat_permissionsNoPass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.

Schema Changelog

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

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses the admin permission requirement, the non-obvious 'pass True for all permissions to lift restrictions' behavior, and the success return value. It does not describe what happens to existing restrictions when only some permissions are passed, but the schema mitigates much of that ambiguity.

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 each earn their place: what the tool does, the authorization prerequisite, the special unrestricted behavior, and the return value. There is no filler, repetition, or unnecessary detail.

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

Completeness5/5

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

For a mutating admin tool with no annotations and no output schema, the description covers everything essential to call it correctly: operation scope, admin rights requirement, return value, and the non-obvious lift-restriction behavior. The parameter details are fully handled by the schema, so no critical context is missing.

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

Parameters4/5

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

The input schema already documents all parameters with 100% coverage, so the baseline is 3. The description adds meaningful parameter semantics beyond the schema by explaining that passing True for all permissions lifts restrictions—a key behavior not evident from the permissions object alone.

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 states a clear action and target: 'Restrict a user in a supergroup.' This is specific and understandable, though it does not explicitly contrast with sibling tools like banChatMember or setChatPermissions, so it stops short of full sibling differentiation.

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 clear operational context: the bot must be an administrator with can_restrict_members rights, and lifting restrictions is achieved by passing True for all permissions. It does not explicitly say when to prefer restrictChatMember over banChatMember or unbanChatMember, but the context is sufficient for most routing decisions.

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