Skip to main content
Glama

discord_get_invite

Read-only

Look up a single Discord invite by code to identify its target server and channel, inviter, and expiry. Works for public invites and respects configured guild allow-lists; read-only.

Instructions

Look up a single invite by its code: target server and channel, inviter, and expiry. Works for any public invite, limited to the DISCORD_ALLOWED_GUILDS servers when that allow-list is set. This endpoint never returns invite metadata (uses/max_uses/max_age read 0, temporary reads false and created_at null); use discord_list_invites or discord_list_channel_invites for real counters. Read-only. Returns a JSON 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": {
      "invite_code": "<invite_code>"
    },
    "name": "discord_get_invite"
  }
}

Input Schema

NameRequiredDescriptionDefault
invite_codeYesThe invite code, e.g. 'abc123'. A full discord.gg/abc123 URL is also accepted and stripped.

Output Schema

NameRequiredDescriptionDefault
urlYes
codeYes
usesYes
inviterYes
max_ageYes
guild_idYes
max_usesYes
temporaryYes
channel_idYes
created_atYes
expires_atYes
guild_nameYes
channel_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv2.2.1
    • removedOutput schema / properties / channel_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / channel_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / channel_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / channel_name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / created_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / created_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / expires_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / expires_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / guild_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / guild_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / guild_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / guild_name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed1 schema field changedv2.0.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "channel_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "channel_name": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "code": {
      +      "type": "string"
      +    },
      +    "created_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "expires_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "guild_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "guild_name": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "inviter": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "id": {
      +              "type": "string"
      +            },
      +            "username": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "username"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "max_age": {
      +      "type": "number"
      +    },
      +    "max_uses": {
      +      "type": "number"
      +    },
      +    "temporary": {
      +      "type": "boolean"
      +    },
      +    "url": {
      +      "type": "string"
      +    },
      +    "uses": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "url",
      +    "guild_id",
      +    "guild_name",
      +    "channel_id",
      +    "channel_name",
      +    "inviter",
      +    "uses",
      +    "max_uses",
      +    "max_age",
      +    "temporary",
      +    "created_at",
      +    "expires_at"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changedv1.6.0
    • changedInput schema / properties / invite_code / description
      Previous value: -"The invite code (e.g. 'abc123' from discord.gg/abc123)."New value: +"The invite code, e.g. 'abc123'. A full discord.gg/abc123 URL is also accepted and stripped."
  5. Addedv1.5.0

TDQS

A5/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, it discloses a non-obvious behavioral quirk: the endpoint never returns invite metadata, so uses/max_uses/max_age read 0, temporary reads false, and created_at is null. It also notes the allow-list restriction and that a JSON object is returned, which annotations alone would not convey.

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?

Front-loads the core action, then the caveat about zeroed counters, then a brief read-only/return note. Every sentence adds distinct information with no filler.

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 read tool with an output schema and safety annotations, the description covers scope, restrictions, the misleading zero-value fields, and the return shape. Nothing an agent needs 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.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single parameter already documents that a full discord.gg URL is accepted and stripped, so the schema carries the parameter burden. The description adds no contradictory or redundant parameter detail, which is appropriate.

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?

States a specific verb and resource ('Look up a single invite by its code') and enumerates what it resolves to: target server and channel, inviter, and expiry. This clearly separates it from the list-oriented invite siblings.

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?

Explicitly routes the agent: use this for a single code lookup, and use discord_list_invites or discord_list_channel_invites when real usage counters are needed. It also states the DISCORD_ALLOWED_GUILDS scoping condition, so the agent knows when the tool may fail or be restricted.

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