Skip to main content
Glama
grammy-mcp
by louietyj

editChatInviteLink

Destructive

Edit a non-primary Telegram invite link created by your bot, updating its name, expiry, member limit, or join-request approval; administrator rights are required.

Instructions

Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a 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": "editChatInviteLink"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoInvite link name; 0-32 characters
chat_idYesUnique identifier for the target chat or username of the target channel in the format `@username`
expire_dateNoPoint in time (Unix timestamp) when the link will expire
invite_linkYesThe invite link to edit
member_limitNoThe maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
creates_join_requestNoTrue, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the mutating nature is covered; the description usefully adds the admin-rights requirement and the return type. However, it omits meaningful behavior for a destructive edit — e.g. whether optional fields left out are reset or preserved, and whether editing invalidates the existing link for current members. The "non-primary" restriction is a genuine addition beyond the annotations.

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, front-loaded with purpose, followed by the precondition and the return value. Each sentence contributes information with no filler.

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?

For a six-parameter mutation with no output schema, the description covers purpose, permissions, and return type, which is close to sufficient. The remaining gap is the semantics of omitted optional parameters on an already-published link, plus no pointer to revokeChatInviteLink or editChatSubscriptionInviteLink as alternatives.

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%, including the constraint interactions (creates_join_request excludes member_limit), so the schema already carries full parameter meaning. The description adds no parameter-level detail; baseline 3 applies.

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?

States a specific verb and resource ("edit a non-primary invite link created by the bot") and constrains scope to non-primary links authored by the bot, which distinguishes it from createChatInviteLink and revokeChatInviteLink. It never names those siblings, so the differentiation is implicit rather than explicit.

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?

Gives a clear precondition for use: the bot must be an administrator in the chat with the appropriate administrator rights. It does not mention alternatives (create, revoke, or the subscription-link variant) or when not to use this method, so it falls short of explicit routing guidance.

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