list_permissions
View all Discord permission names for configuring roles and channel overwrites. This tool provides the complete list of permissions available in Discord's permission system.
Instructions
List all available Discord permission names that can be used for roles and channel overwrites
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/permission-tools.ts:168-217 (handler)Handler function for the list_permissions tool. It extracts all string keys from PermissionFlagsBits (Discord permission flags), filters out numeric keys, categorizes them into groups like general, text, voice, etc., and returns a structured JSON response with the full list and categorized permissions.async () => { const permissions = Object.keys(PermissionFlagsBits).filter( (key) => isNaN(Number(key)) ); const categorized = { general: [ 'Administrator', 'ViewAuditLog', 'ViewGuildInsights', 'ManageGuild', 'ManageRoles', 'ManageChannels', 'KickMembers', 'BanMembers', 'CreateInstantInvite', 'ChangeNickname', 'ManageNicknames', 'ManageEmojisAndStickers', 'ManageWebhooks', 'ManageGuildExpressions', 'ViewChannel', ], text: [ 'SendMessages', 'SendMessagesInThreads', 'CreatePublicThreads', 'CreatePrivateThreads', 'EmbedLinks', 'AttachFiles', 'AddReactions', 'UseExternalEmojis', 'UseExternalStickers', 'MentionEveryone', 'ManageMessages', 'ManageThreads', 'ReadMessageHistory', 'SendTTSMessages', 'UseApplicationCommands', 'SendVoiceMessages', ], voice: [ 'Connect', 'Speak', 'Stream', 'UseEmbeddedActivities', 'UseSoundboard', 'UseExternalSounds', 'UseVAD', 'PrioritySpeaker', 'MuteMembers', 'DeafenMembers', 'MoveMembers', ], stage: [ 'RequestToSpeak', ], events: [ 'CreateEvents', 'ManageEvents', ], monetization: [ 'CreateGuildExpressions', 'ViewCreatorMonetizationAnalytics', ], }; return { content: [ { type: 'text', text: JSON.stringify({ message: 'Available Discord permissions', permissions, categorized, }, null, 2), }, ], }; } );
- src/tools/permission-tools.ts:163-218 (registration)Direct registration of the list_permissions tool within the registerPermissionTools function using server.tool(). Includes tool name, description, empty input schema (no parameters required), and inline handler function.// List available permissions server.tool( 'list_permissions', 'List all available Discord permission names that can be used for roles and channel overwrites', {}, async () => { const permissions = Object.keys(PermissionFlagsBits).filter( (key) => isNaN(Number(key)) ); const categorized = { general: [ 'Administrator', 'ViewAuditLog', 'ViewGuildInsights', 'ManageGuild', 'ManageRoles', 'ManageChannels', 'KickMembers', 'BanMembers', 'CreateInstantInvite', 'ChangeNickname', 'ManageNicknames', 'ManageEmojisAndStickers', 'ManageWebhooks', 'ManageGuildExpressions', 'ViewChannel', ], text: [ 'SendMessages', 'SendMessagesInThreads', 'CreatePublicThreads', 'CreatePrivateThreads', 'EmbedLinks', 'AttachFiles', 'AddReactions', 'UseExternalEmojis', 'UseExternalStickers', 'MentionEveryone', 'ManageMessages', 'ManageThreads', 'ReadMessageHistory', 'SendTTSMessages', 'UseApplicationCommands', 'SendVoiceMessages', ], voice: [ 'Connect', 'Speak', 'Stream', 'UseEmbeddedActivities', 'UseSoundboard', 'UseExternalSounds', 'UseVAD', 'PrioritySpeaker', 'MuteMembers', 'DeafenMembers', 'MoveMembers', ], stage: [ 'RequestToSpeak', ], events: [ 'CreateEvents', 'ManageEvents', ], monetization: [ 'CreateGuildExpressions', 'ViewCreatorMonetizationAnalytics', ], }; return { content: [ { type: 'text', text: JSON.stringify({ message: 'Available Discord permissions', permissions, categorized, }, null, 2), }, ], }; } );
- src/index.ts:57-57 (registration)High-level registration call in the main server setup that invokes registerPermissionTools(server), thereby registering the list_permissions tool along with other permission tools.registerPermissionTools(server);
- src/index.ts:15-15 (registration)Import of the registerPermissionTools function from permission-tools.ts, enabling its use in the main index.ts file.import { registerPermissionTools } from './tools/permission-tools.js';