Skip to main content
Glama
Discord MCP - Discord server management MCP for AI agents

Discord MCP - Discord server management MCP for AI agents

Create AutoMod rule

create_automod_rule

Create server-side Discord moderation rules to filter spam, keywords, mention floods, and member profiles, triggering message blocks, channel alerts, or timeouts.

Instructions

Create a server-side moderation rule that runs on Discord's own infrastructure: Discord-maintained preset word lists (slurs, profanity, sexual content), custom keyword filters (with optional regex), spam detection, mention-flood limits, or member_profile checks on usernames, nicknames, and bios (Community servers only). For slur or hate-speech filtering prefer trigger keyword_preset with the slurs preset: Discord maintains the word list, so none needs to be written. Actions: block the message, alert a channel, and/or time the sender out (timeout is not available on spam, keyword_preset, or member_profile rules). On member_profile rules block quarantines the member until they fix their profile.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "trigger": "<trigger>",
      "actions": "<actions>"
    },
    "name": "create_automod_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
guildNoGuild (server) name or ID. Omit to use the default guild.
actionsYesWhat happens on a match.
enabledNoDefault true.
presetsNoFor keyword_preset rules: Discord-maintained lists.
triggerYes
keywordsNoFor keyword rules. Wildcards: word* matches prefixes.
allow_listNoWords exempt from keyword and keyword_preset rules.
exempt_rolesNo
alert_channelNoWhere alert actions post.
mention_limitNoFor mention_spam rules: max unique mentions per message.
regex_patternsNoFor keyword rules; Rust-flavored regex.
exempt_channelsNo
timeout_minutesNoHow long timeout actions last.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
  3. Changed1 schema field changedv1.1.2
    • changedInput schema / properties / trigger / enum
      Previous value: -[
      -  "keyword",
      -  "keyword_preset",
      -  "spam",
      -  "mention_spam"
      -]New value: +[
      +  "keyword",
      +  "keyword_preset",
      +  "spam",
      +  "mention_spam",
      +  "member_profile"
      +]
  4. First observedv1.0.2

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint=false and destructiveHint=false; the description goes well beyond by explaining that rules run on Discord's infrastructure, enumerating the three action types, and spelling out the action-by-trigger compatibility matrix plus the member_profile quarantine side effect. It does not mention required permissions (e.g. Manage Server) or per-guild rule limits, which are the remaining behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening clause front-loads purpose and scope before the enumeration of triggers and actions, and every sentence carries operative information. The parenthetical trigger list is dense but readable; a small amount of compression could still be gained by moving action/trigger compatibility into a tighter clause.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter creation tool with no output schema, the description covers the decision space an agent actually needs: which trigger to choose, which actions are legal for that trigger, and the special-rule semantics. The remaining schema-documented parameters (exemptions, limits, channel targets) are adequately described in the input schema itself.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is a solid 71%, so the schema carries much of the load, but the description adds cross-parameter meaning the schema cannot: which trigger pairs with presets, keywords, or regex, that regex is optional within keyword rules, and that timeout actions are invalid for three trigger types. Parameters like guild, enabled, exempt_roles, and exempt_channels are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Create a server-side moderation rule') and immediately enumerates the five trigger families it can produce, so the agent knows exactly which rule types this tool covers. It is clearly distinct from sibling tools like update_automod_rule, list_automod_rules, and delete_automod_rule, which operate on existing rules.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit conditional guidance: 'For slur or hate-speech filtering prefer trigger keyword_preset with the slurs preset' and 'timeout is not available on spam, keyword_preset, or member_profile rules'. The member_profile quarantine behavior is also flagged. It lacks guidance on when to create versus update an existing rule, so it stops short of full alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools