Skip to main content
Glama
grammy-mcp
by louietyj

revokeChatInviteLink

Destructive

Invalidates a bot-created Telegram chat invite link and returns the revoked ChatInviteLink object; invalidating the primary link automatically creates a new one.

Instructions

Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.

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>",
      "invite_link": "<invite_link>"
    },
    "name": "revokeChatInviteLink"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYesUnique identifier of the target chat or username of the target channel in the format `@username`
invite_linkYesThe invite link to revoke

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, yet the description still adds real value: a non-obvious side effect (revoking the primary link auto-generates a new one), a permission requirement (bot must be chat administrator), and the return type (ChatInviteLink object). Nothing contradicts the annotations, and the primary-link replacement behavior is the kind of detail an agent could not infer from the structured fields.

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?

Four short sentences, front-loaded with the action, followed by side effects, prerequisites, and return value. The slightly redundant phrasing about being an administrator 'with the appropriate administrator rights' is the only real slack.

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?

With only two fully documented parameters and no output schema, the description covers everything an agent needs: what the call does, the special side effect, the permission prerequisite, and the shape of the return. No gap remains for a tool of this complexity.

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 the baseline is 3, but the phrase 'an invite link created by the bot' adds a real validity constraint on invite_link that the schema does not express. The chat_id parameter gains no further meaning beyond its schema description.

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 specific verb and resource: revoke an invite link created by the bot. That is clearly distinguishable from createChatInviteLink and editChatInviteLink, though the description never names those siblings explicitly. The operation is unambiguous, but the sibling differentiation is left implicit.

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 a clear condition for use (revoking a bot-created invite link) and states prerequisites: the bot must be an administrator with the appropriate rights. It does not spell out when not to use it or point to editChatInviteLink for link modification rather than removal, so it falls short of a 5.

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