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
| Name | Required | Description | Default |
|---|---|---|---|
| guild_id | Yes | ||
| user_id | Yes | ||
| role_id | Yes | ||
| reason | No |
Implementation Reference
- src/tools/roles.ts:179-184 (handler)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}.` }] }; } - src/tools/roles.ts:76-89 (schema)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"], }, },