Skip to main content
Glama
Discord MCP - Discord server management MCP for AI agents

Discord MCP - Discord server management MCP for AI agents

Create invite

create_invite

Generate a Discord channel invite link with optional expiry, use limits, roles, or user restrictions; privileged or open-channel invites require a preview and confirmation token.

Instructions

Create an invite link for a channel. Defaults are deliberate: expires in 24 hours, unlimited uses. A never-expiring invite must be asked for explicitly with max_age_seconds 0. roles gives roles to whoever joins with it, and for_users limits it to particular people. An invite whose roles would give moderator or admin powers (such as banning, kicking, or timing out members, deleting other people's messages, or managing the server, roles, or channels), or open channels, needs confirming: the first call changes nothing and returns a preview and a confirm_token, and repeating the call with the token makes the change.

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": {
      "channel": "<channel>"
    },
    "name": "create_invite"
  }
}

Input Schema

NameRequiredDescriptionDefault
guildNoGuild (server) name or ID. Omit to use the default guild.
rolesNoRole names or IDs given to everyone who joins with this invite. Needs Manage Roles.
channelYesChannel name or ID.
dry_runNoIf true, nothing is changed: the result shows what this call would do.
max_usesNoUse limit, 0 for unlimited. Default 0.
for_usersNoUser IDs of the only people who can use it (up to 1000). They need not be in the server yet.
temporaryNoMembers who join leave again when they disconnect.
confirm_tokenNoThe token from this exact action's preview. Where the app can show a confirmation dialog, calling with it asks the user there, and it happens only if they agree.
max_age_secondsNoLifetime in seconds, 0 for never. Default 86400 (24h).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.2
    • addedInput schema / properties / dry_run / description
      Added value: +"If true, nothing is changed: the result shows what this call would do."
  2. Changed5 schema fields changedv1.4.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / confirm_token
      Added value: +{
      +  "description": "The token from this exact action's preview. Where the app can show a confirmation dialog, calling with it asks the user there, and it happens only if they agree.",
      +  "type": "string"
      +}
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / for_users
      Added value: +{
      +  "description": "User IDs of the only people who can use it (up to 1000). They need not be in the server yet.",
      +  "items": {
      +    "pattern": "^\\d{17,20}$",
      +    "type": "string"
      +  },
      +  "maxItems": 1000,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / roles
      Added value: +{
      +  "description": "Role names or IDs given to everyone who joins with this invite. Needs Manage Roles.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "minItems": 1,
      +  "type": "array"
      +}
  3. Changed1 schema field changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
  4. First observedv1.0.2

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint=false / destructiveHint=false annotations: it discloses the deliberate defaults (24h expiry, unlimited uses), that max_age_seconds 0 is the only way to get a permanent invite, and precisely which privilege combinations (moderator/admin powers, open channels) trigger a two-phase preview-then-confirm flow. The explanation that the first call changes nothing and returns a preview plus confirm_token is exactly the behavioral context an agent needs before invoking a mutating tool.

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 the action, then defaults, then the confirmation rule — a sensible priority order with no filler. The final sentence is long and parenthetical (banning, kicking, timing out, deleting messages, managing server/roles/channels) and could be tightened, though the detail is genuinely load-bearing for deciding when confirmation fires.

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 9-parameter mutation tool with no output schema, it covers defaults, edge values, and the confirmation contract well. Two gaps remain: it does not state the base permission required to create an invite in the first place (only roles' Manage Roles requirement, which lives in the schema), and it does not describe what a normal successful call returns, which matters because there is no output schema.

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 schema already carries the baseline. The description still adds interpretive value by explaining that roles propagate to whoever joins, that for_users restricts use to specific people, and that max_age_seconds 0 means never — semantics beyond the field descriptions.

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?

Opens with a specific verb+resource: 'Create an invite link for a channel,' which is immediately distinguishable from the delete_invite and get_invite siblings in the same family. It never explicitly names an alternative or contrasting scope, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives strong conditional guidance inside this tool's own flow (when a confirmation is required, and that a never-expiring invite 'must be asked for explicitly'). However, it never says when to choose this tool over other invite-management siblings, so usage is implied rather than routed.

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