Skip to main content
Glama
discord-mcp

discord-mcp

invites_get

Read-onlyIdempotent

Look up a Discord invite by code or full URL to inspect it before sharing or deleting, and to resolve which guild and channel it points at.

Instructions

Purpose: Look up a Discord invite by its code (or full URL after stripping the prefix).

When to use: - Inspect an invite before deleting or sharing. - Resolve which guild/channel an invite points at.

When NOT to use: - Listing all invites for a channel → use invites_list_channel.

Example: {code:"abc123def", with_counts:true}

Returns: Projected invite shape with optional counts. Guild and channel names remain raw Discord data; untrusted_names provides a separately fenced copy.

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": {
      "code": "<code>"
    },
    "name": "invites_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesInvite code (the bit after https://discord.gg/)
with_countsNoInclude approximate member/presence counts
with_expirationNoInclude expires_at field
guild_scheduled_event_idNoSurface a specific scheduled event tied to the invite

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.34.1
    • addedInput schema / properties / code / pattern
      Added value: +"^[A-Za-z0-9_-]+$"
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": {},
      -    "properties": {
      -      "approximate_member_count": {
      -        "type": "number"
      -      },
      -      "approximate_presence_count": {
      -        "type": "number"
      -      },
      -      "channel_id": {
      -        "anyOf": [
      -          {
      -            "description": "Discord channel ID (snowflake)",
      -            "pattern": "^\\d{17,20}$",
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "code": {
      -        "description": "Discord invite code (base62, NOT a snowflake)",
      -        "maxLength": 32,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "expires_at": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "guild_id": {
      -        "description": "Discord guild (server) ID",
      -        "pattern": "^\\d{17,20}$",
      -        "type": "string"
      -      },
      -      "inviter_id": {
      -        "description": "Discord user ID",
      -        "pattern": "^\\d{17,20}$",
      -        "type": "string"
      -      },
      -      "inviter_name": {
      -        "type": "string"
      -      },
      -      "untrusted_names": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "code",
      -      "channel_id",
      -      "untrusted_names"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "category": {
      -        "enum": [
      -          "client",
      -          "server"
      -        ],
      -        "type": "string"
      -      },
      -      "code": {
      -        "type": "string"
      -      },
      -      "recovery_hint": {
      -        "type": "string"
      -      },
      -      "retriable": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "code",
      -      "retriable",
      -      "category",
      -      "recovery_hint"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": {},
      +    "properties": {
      +      "approximate_member_count": {
      +        "type": "number"
      +      },
      +      "approximate_presence_count": {
      +        "type": "number"
      +      },
      +      "channel_id": {
      +        "anyOf": [
      +          {
      +            "description": "Discord channel ID (snowflake)",
      +            "pattern": "^\\d{17,20}$",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "code": {
      +        "description": "Discord invite code (ASCII letters, digits, _ or -; NOT a snowflake)",
      +        "maxLength": 32,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9_-]+$",
      +        "type": "string"
      +      },
      +      "expires_at": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "guild_id": {
      +        "description": "Discord guild (server) ID",
      +        "pattern": "^\\d{17,20}$",
      +        "type": "string"
      +      },
      +      "inviter_id": {
      +        "description": "Discord user ID",
      +        "pattern": "^\\d{17,20}$",
      +        "type": "string"
      +      },
      +      "inviter_name": {
      +        "type": "string"
      +      },
      +      "untrusted_names": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "channel_id",
      +      "untrusted_names"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "category": {
      +        "enum": [
      +          "client",
      +          "server"
      +        ],
      +        "type": "string"
      +      },
      +      "code": {
      +        "type": "string"
      +      },
      +      "recovery_hint": {
      +        "type": "string"
      +      },
      +      "retriable": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "retriable",
      +      "category",
      +      "recovery_hint"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changedv0.28.0
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": {},
      -    "properties": {
      -      "approximate_member_count": {
      -        "type": "number"
      -      },
      -      "approximate_presence_count": {
      -        "type": "number"
      -      },
      -      "channel_id": {
      -        "anyOf": [
      -          {
      -            "description": "Discord channel ID (snowflake)",
      -            "pattern": "^\\d{17,20}$",
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "code": {
      -        "description": "Discord invite code (base62, NOT a snowflake)",
      -        "maxLength": 32,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "expires_at": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "guild_id": {
      -        "description": "Discord guild (server) ID",
      -        "pattern": "^\\d{17,20}$",
      -        "type": "string"
      -      },
      -      "inviter_id": {
      -        "description": "Discord user ID",
      -        "pattern": "^\\d{17,20}$",
      -        "type": "string"
      -      },
      -      "inviter_name": {
      -        "type": "string"
      -      },
      -      "untrusted_names": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "code",
      -      "channel_id",
      -      "untrusted_names"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "category": {
      -        "enum": [
      -          "client",
      -          "server"
      -        ],
      -        "type": "string"
      -      },
      -      "code": {
      -        "type": "string"
      -      },
      -      "recovery_hint": {
      -        "type": "string"
      -      },
      -      "retriable": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "code",
      -      "retriable",
      -      "category",
      -      "recovery_hint"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": {},
      +    "properties": {
      +      "approximate_member_count": {
      +        "type": "number"
      +      },
      +      "approximate_presence_count": {
      +        "type": "number"
      +      },
      +      "channel_id": {
      +        "anyOf": [
      +          {
      +            "description": "Discord channel ID (snowflake)",
      +            "pattern": "^\\d{17,20}$",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "code": {
      +        "description": "Discord invite code (base62, NOT a snowflake)",
      +        "maxLength": 32,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "expires_at": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "guild_id": {
      +        "description": "Discord guild (server) ID",
      +        "pattern": "^\\d{17,20}$",
      +        "type": "string"
      +      },
      +      "inviter_id": {
      +        "description": "Discord user ID",
      +        "pattern": "^\\d{17,20}$",
      +        "type": "string"
      +      },
      +      "inviter_name": {
      +        "type": "string"
      +      },
      +      "untrusted_names": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "channel_id",
      +      "untrusted_names"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "category": {
      +        "enum": [
      +          "client",
      +          "server"
      +        ],
      +        "type": "string"
      +      },
      +      "code": {
      +        "type": "string"
      +      },
      +      "recovery_hint": {
      +        "type": "string"
      +      },
      +      "retriable": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "retriable",
      +      "category",
      +      "recovery_hint"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. First observedv0.22.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and open-world, so the safety profile is covered. The description adds real value beyond that by disclosing that guild/channel names are raw Discord data and that untrusted_names supplies a separately fenced copy — a security-relevant trait an agent would not otherwise know. Minor gap: no mention of failure behavior for invalid or expired codes.

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 labelled sections (Purpose / When to use / When NOT to use / Example / Returns) are front-loaded and scannable, with no wasted sentences. The 'Returns' section borders on redundant given an output schema exists, though the untrusted_names note justifies its presence.

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 four fully documented parameters, complete annotations, and a published output schema, the description supplies exactly the missing layer: when to reach for it, the URL-stripping nuance, and the untrusted-data caveat. An agent can call this correctly without further context.

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 baseline is 3, and the description pushes past it by clarifying that the code parameter also accepts a full URL with the prefix stripped, which the schema's 'bit after https://discord.gg/' wording does not state. The inline example showing code plus with_counts reinforces parameter usage without restating every field.

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?

The description opens with a specific verb and resource ('Look up a Discord invite by its code') and adds the scoping detail that a full URL is accepted after prefix stripping. It is immediately distinguishable from the listing sibling invites_list_channel.

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

Usage Guidelines5/5

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

It gives both positive triggers ('Inspect an invite before deleting or sharing', 'Resolve which guild/channel an invite points at') and an explicit exclusion that names the correct alternative ('Listing all invites for a channel → use invites_list_channel'). Nothing is left to inference.

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