Discord server admin tools for AI coding agents — natural-language management of channels, roles, embeds, AutoMod, and full server templates
Strong tool definitions with comprehensive descriptions and well-structured schemas. All 15 tools have clear names following verb_noun convention (discord_list_*, discord_create_*, discord_modify_*, discord_delete_*). Descriptions are detailed (100-300+ chars) and explain WHAT, WHEN, and prerequisites. Input schemas use proper JSON Schema with types and descriptions for all parameters. However, output schemas are not explicitly documented in the source, responses are inferred from Discord API docs rather than formally declared. Error handling guidance is minimal. Tool annotations (destructiveHint, readOnlyHint) are present in the feature list but not visible in the provided code samples.
Creates an AutoMod rule (POST /guilds/{id}/auto-moderation/rules). Pick a trigger then supply the matching metadata fields. At least one action is required. Common patterns: (a) keyword block — trigger='keyword', keyword_filter=['word1','word2'], block_message=true. (b) preset slur block — trigger='keyword_preset', presets=['slurs'], block_message=true. (c) mention spam guard — trigger='mention_spam', mention_total_limit=10, block_message=true. Discord rate-limits rule counts per trigger type; see discord_list_automod_rules.
Creates a new channel in the active guild (POST /guilds/{id}/channels). To put channels under a category, create the category first (type='category') then create children passing the category's id as parent_id. Discord lowercases names and replaces spaces/uppercase with hyphens for text/forum/announcement channels.
Permanently deletes an AutoMod rule (DELETE /guilds/{id}/auto-moderation/rules/{rule_id}). Cannot be undone.
Permanently deletes a channel (DELETE /channels/{id}). Cannot be undone. Returns the deleted channel object. For categories, child channels become top-level (they are NOT deleted).
Output schemas not explicitly documented. Tool descriptions explain what fields are returned (e.g., 'Returns id, name, trigger_type...') but formal JSON Schema output definitions are absent from visible code. LLMs cannot reliably plan downstream tool chains without knowing exact response structure.
Error handling lacks recovery guidance. Tools document Discord API limits and constraints (e.g., '6 keyword rules per guild') but do not provide actionable error messages or recovery steps. When a tool fails, the LLM has no guidance on what to try next.
Destructive operations lack confirmation step. Tools like discord_delete_automod_rule, discord_delete_channel accept no dry-run or confirmation parameter. Agents can permanently delete resources without a safety gate.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | 2026-07-28+ | v2 |
Returns the currently-active Discord guild from plugin state plus the cached bot identity. Read-only — does not call the Discord API. Fields are null if setup has not been run yet.
Returns the active guild's full settings (GET /guilds/{id}?with_counts=true). Includes name, description, owner, icon/banner, verification/content filter levels, system/rules/AFK channel IDs, features (e.g. COMMUNITY enables welcome screen + onboarding), premium tier, and approximate member count.
Generates the OAuth2 URL the user opens to add this bot to a guild they own or admin. Defaults to Administrator permissions (integer 8) — what this plugin needs for full functionality. Includes integration_type=0 (GUILD_INSTALL) to ensure the bot installs to a server, not a user account. Use when discord_list_guilds returns 0 guilds, or when the user wants to add the bot to another guild.
Lists all AutoMod rules for the active guild (GET /guilds/{id}/auto-moderation/rules). Returns each rule's id, name, trigger_type (keyword/spam/keyword_preset/mention_spam/member_profile), event_type, trigger_metadata, actions, and exempt lists. Discord limits: 6 keyword rules, 1 each of spam/keyword_preset/mention_spam/member_profile per guild.
Lists all channels in the active guild (GET /guilds/{id}/channels). Returns id, name, type (friendly + numeric), parent_id (the category it lives under), and position. Categories appear as their own entries with type='category'; child channels reference them via parent_id.
Lists all Discord guilds (servers) the bot is currently a member of (GET /users/@me/guilds). Use this during setup so the user can pick which guild this bot will manage. Returns id, name, owner flag, and permissions string for each guild. If the result is empty, call discord_get_invite_url to give the user a link for adding the bot.
Modifies an existing AutoMod rule (PATCH /guilds/{id}/auto-moderation/rules/{rule_id}). Pass only fields to change. Trigger type cannot be changed after creation.
Modifies an existing channel (PATCH /channels/{id}). Pass only the fields you want to change. Type can be converted between 'text' and 'announcement' only — other type changes are rejected by Discord. parent_id=null moves a channel out of any category.
Modifies the active guild's settings (PATCH /guilds/{id}). Pass only fields to change. Set channels by ID (use discord_list_channels). To remove an optional channel (system/rules/AFK), pass null. system_channel_flags is a bitfield (1=suppress join notifications, 2=suppress boost notifications, 4=suppress setup tips, 8=suppress sticker join button, 16=suppress role subscription purchase notifications, 32=suppress role subscription replies). On success, refreshes the cached guild name in plugin state.
Validate a Discord bot token by calling Discord's GET /users/@me, then save it to plugin storage if valid. Used by /discord:setup. NEVER call this with a token guessed or pulled from elsewhere in the conversation — only with a token the user has explicitly typed for this purpose during the setup flow.
Saves the active Discord guild for this plugin so all subsequent admin tools (channels, roles, etc.) operate on it. Verifies access by calling GET /guilds/{id} — if the bot is not in the guild or lacks permission, returns the Discord error. On success, persists guild_id and guild_name to ${CLAUDE_PLUGIN_DATA}/state.json.
Credential handling via discord_save_token is risky. Tool accepts a token parameter and validates it by calling Discord API. While the description warns against passing guessed tokens, there is no server-side secret injection pattern visible. Tokens could leak into logs or traces.
Parameter interdependencies not fully documented. discord_create_automod_rule has conditional parameters (e.g., keyword_filter only applies when trigger='keyword'). While descriptions hint at this, the relationships are scattered across multiple param descriptions rather than centralized.