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

Create a Discord channel invite link with 24-hour expiry and unlimited uses by default; set roles, user limits, or no expiry, and confirm risky invites before they are made.

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_runNo
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. 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"
      +}
  2. Changed1 schema field changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.0.2

TDQS

A4.7/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 by disclosing the deliberate defaults (24h expiry, unlimited uses) and the two-step confirm protocol where the first call mutates nothing and returns a preview plus confirm_token. It also enumerates which role grants (ban, kick, timeout, delete messages, manage server/roles/channels) trigger that confirmation, which is exactly the behavioral context an agent cannot get from 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the core action and defaults before the conditional confirmation rule. No filler, and the most decision-relevant constraint (the confirm-two-step flow) lands clearly at the end.

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 9-parameter mutation with no output schema, the description covers the essentials: what is created, what the defaults are, how to override the expiry to never, and the full preview/confirm protocol. 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 89%, so the baseline is 3, but the description adds real meaning: it reinforces max_age_seconds=0 as the never-expire switch, explains that roles propagate to joiners and for_users restricts to particular people, and clarifies the multi-call semantics of confirm_token. Some default values it restates (24h, unlimited uses) are already in the schema, which keeps it from a 5.

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?

Opens with a specific verb+resource ("Create an invite link for a channel") and immediately differentiates itself from delete_invite/get_invite by scoping to creation. An agent knows exactly what object is produced and for what target without opening the schema.

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 concrete conditions: a never-expiring invite must be requested explicitly with max_age_seconds 0, and high-privilege roles or open channels require the confirm flow. It stops short of naming or excluding sibling tools such as get_invite or delete_invite, so it is strong context rather than explicit alternative routing.

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