Skip to main content
Glama

discord_list_guilds

Retrieve a list of all Discord servers where the bot is currently connected, enabling server management and monitoring.

Instructions

List all Discord servers the bot is connected to.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Definition of the discord_list_guilds tool, including its name, description, and empty input schema.
    {
      name: "discord_list_guilds",
      description: "List all Discord servers the bot is connected to.",
      inputSchema: { type: "object", properties: {} },
    },
  • Implementation of the discord_list_guilds tool, which fetches guilds from the Discord client cache and returns them as a JSON string.
    case "discord_list_guilds": {
      const guilds = discord.guilds.cache.map((g) => ({
        id: g.id, name: g.name, memberCount: g.memberCount, icon: g.iconURL(),
      }));
      return { content: [{ type: "text", text: JSON.stringify(guilds, null, 2) }] };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaSympa/discord-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server