Skip to main content
Glama

discord_remove_role

Remove a role from a Discord member to manage permissions or update user status. Specify guild, user, and role IDs to execute the action.

Instructions

Remove a role from a member.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
user_idYes
role_idYes
reasonNo

Implementation Reference

  • Handler logic for the discord_remove_role tool which removes a role from a member.
    case "discord_remove_role": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      const member = await guild.members.fetch(args.user_id as string);
      await member.roles.remove(args.role_id as string, args.reason as string | undefined);
      return { content: [{ type: "text", text: `✅ Role removed from ${member.user.tag}.` }] };
    }
  • Schema definition for the discord_remove_role tool.
    {
      name: "discord_remove_role",
      description: "Remove a role from a member.",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          user_id: { type: "string" },
          role_id: { type: "string" },
          reason: { type: "string" },
        },
        required: ["guild_id", "user_id", "role_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