Skip to main content
Glama

discord_delete_role

Delete a role from a Discord server by specifying the guild ID and role ID. This tool removes unwanted or outdated roles to maintain organized server permissions.

Instructions

Delete a role from a guild.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
role_idYes
reasonNo

Implementation Reference

  • The handler implementation for 'discord_delete_role', which fetches the guild and role, then deletes the role.
    case "discord_delete_role": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      const role = await guild.roles.fetch(args.role_id as string) as Role;
      await role.delete(args.reason as string | undefined);
      return { content: [{ type: "text", text: `✅ Role "${role.name}" deleted.` }] };
    }
  • The schema definition for 'discord_delete_role', specifying required guild_id and role_id.
      name: "discord_delete_role",
      description: "Delete a role from a guild.",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          role_id: { type: "string" },
          reason: { type: "string" },
        },
        required: ["guild_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