Skip to main content
Glama

discord_list_members

Retrieve and display Discord server members with their assigned roles using guild ID and optional limit parameters.

Instructions

List guild members with their roles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
limitNo1–1000, default 50.

Implementation Reference

  • The handler implementation for the 'discord_list_members' tool which fetches guild members and formats their details.
    case "discord_list_members": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      const limit = Math.min(Number(args.limit ?? 50), 1000);
      const members = await guild.members.list({ limit });
      const result = [...members.values()].map((m: GuildMember) => ({
        id: m.id, username: m.user.tag, nickname: m.nickname,
        roles: m.roles.cache.filter((r) => r.name !== "@everyone").map((r) => ({ id: r.id, name: r.name })),
        joinedAt: m.joinedAt?.toISOString(),
      }));
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • The definition and input schema for the 'discord_list_members' tool.
    {
      name: "discord_list_members",
      description: "List guild members with their roles.",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          limit: { type: "number", description: "1–1000, default 50." },
        },
        required: ["guild_id"],
      },
    },

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