Skip to main content
Glama
grammy-mcp
by louietyj

unbanChatMember

Lift a ban for a user in a supergroup or channel so they can rejoin via link; use only_if_banned to avoid removing non-banned members.

Instructions

Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chat_id": "<chat_id>",
      "user_id": "<user_id>"
    },
    "name": "unbanChatMember"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target group or username of the target supergroup or channel in the format `@username`
user_idYesUnique identifier of the target user
only_if_bannedNoDo nothing if the user is not banned

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false, openWorldHint=true. The description adds the material behavior an agent needs: the user is not automatically re-added but may join via link, the default call also removes the user if they are currently a member, admin rights are required, and the call returns True on success. That is substantive disclosure beyond the structured hints.

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 purpose, then preconditions, then the default-behavior caveat, then the return value — a sensible order. It is slightly repetitive, restating the 'will be able to join' idea in two separate sentences, which is the only thing keeping it from a 5.

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 three-parameter mutation with no output schema, the description covers purpose, permission requirement, side effect on existing members, the opt-out parameter, and the return value. Nothing an agent needs in order to call it correctly 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?

Schema coverage is 100%, so baseline is 3, but the description explains the interaction the schema cannot: the default guarantee that the user is not a member, and that only_if_banned exists precisely to suppress that removal. This makes the parameter's consequence clear rather than just its literal meaning.

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 opens with a specific verb+resource: 'unban a previously banned user in a supergroup or channel.' The scope restriction (supergroup/channel only) and the state transition (banned -> not banned but able to rejoin) distinguish it clearly from banChatMember and the other member-management siblings.

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 states the preconditions (bot must be an administrator) and gives an explicit conditional branch: if you don't want the user removed when they are currently a member, use only_if_banned. What it lacks is any pointer to sibling tools for related intents (e.g. banning, restricting, kicking), so routing against the catalog is only partially supported.

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

Deploy Server

Other Tools