Skip to main content
Glama
grammy-mcp
by louietyj

exportChatInviteLink

Generates a new primary invite link for a Telegram chat, replacing any previous primary link. The bot must be an administrator with the required rights.

Instructions

Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.

Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.

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

Input Schema

NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target chat or username of the target channel in the format `@username`

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, destructiveHint=false), the description discloses the key side effect that any previously generated primary link is revoked, the administrator-membership and rights prerequisites, and the String return value on success. It also warns that links created by other administrators are unusable by this bot, which is behavior no annotation conveys. The revocation side effect sits in mild tension with destructiveHint=false but is consistent with an additive-write operation, not a contradiction.

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?

The purpose, the revocation consequence, and the admin prerequisite are front-loaded in the first two sentences, with the multi-administrator caveat correctly demoted to a trailing note. The final sentence ('if your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again') restates the already-stated revocation behavior and is largely redundant.

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 one-parameter mutation with no output schema, the description covers everything an agent needs: prerequisite permissions, the destructive side effect on the old link, the return type, and the multi-administrator caveat. No material gap remains.

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 coverage is 100% and the single chat_id parameter is fully documented in the schema (including the @username alternative form), so the description adds no syntax or format detail beyond it. Baseline 3 is appropriate since the schema carries all parameter meaning here.

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 opens with a specific verb and resource: 'generate a new primary invite link for a chat', and adds the crucial scope qualifier 'primary' plus the fact that the prior primary link is revoked. That distinguishes it in spirit from the secondary-link siblings, though it never names createChatInviteLink explicitly, so the agent must still infer that boundary.

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 real when-to-use guidance: the bot must generate its own link rather than reuse another administrator's, and it names getChat as an alternative source of an existing link. It also tells the agent to call exportChatInviteLink again to replace its prior link. There is no explicit statement of when NOT to use it or a direct pointer to createChatInviteLink for non-primary links.

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