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 that block or flag preset words, custom keywords, spam, mention floods, or profile violations, and optionally alert a channel or time out senders.

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
nameYesThe rule's name, shown in the server's AutoMod settings.
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.
triggerYesWhat the rule catches: keyword (your own words and patterns), keyword_preset (Discord's word lists), spam (suspected spam), mention_spam (too many mentions in one message), or member_profile (words in member names).
keywordsNoFor keyword rules. Wildcards: word* matches prefixes.
allow_listNoWords exempt from keyword and keyword_preset rules.
exempt_rolesNoRoles the rule does not apply to, by name or ID.
alert_channelNoWhere alert actions post.
mention_limitNoFor mention_spam rules: max unique mentions per message.
regex_patternsNoFor keyword rules; Rust-flavored regex.
exempt_channelsNoChannels the rule does not apply to, by name or ID.
timeout_minutesNoHow long timeout actions last.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.2.2
    • addedInput schema / properties / exempt_channels / description
      Added value: +"Channels the rule does not apply to, by name or ID."
    • addedInput schema / properties / exempt_roles / description
      Added value: +"Roles the rule does not apply to, by name or ID."
    • addedInput schema / properties / name / description
      Added value: +"The rule's name, shown in the server's AutoMod settings."
    • addedInput schema / properties / trigger / description
      Added value: +"What the rule catches: keyword (your own words and patterns), keyword_preset (Discord's word lists), spam (suspected spam), mention_spam (too many mentions in one message), or member_profile (words in member names)."
  2. 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"
  3. Changed1 schema field changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
  4. 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"
      +]
  5. First observedv1.0.2

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare this is a non-read-only, non-destructive write; the description adds context those annotations cannot carry — the rule executes on Discord's own infrastructure, timeout is unavailable on spam/keyword_preset/member_profile rules, and blocking a member_profile rule quarantines the member until the profile is fixed. Permission requirements for creating rules are the notable omission.

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?

Front-loads the core capability, then moves through trigger families, the recommended default, available actions, and the member_profile exception in a logical order. The sentences are long and dense but nearly every clause carries operational information; only the parenthetical about Community servers is borderline filler.

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

Completeness4/5

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

For a 14-parameter tool with no output schema, the description covers the decision space well: what a rule is, which trigger to prefer, what each action does, and where actions are restricted. It leaves the guild/exemption fields entirely to the schema, which is acceptable given full coverage, but a note on the resulting rule object or permission requirements would close the gap.

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?

With 100% schema coverage the baseline is 3, but the description adds cross-parameter meaning the schema states only per-field: presets belong to keyword_preset rules, regex_patterns to keyword rules, and timeout actions are invalid for three of the five triggers. Those compatibility rules are the kind of thing an agent would otherwise get wrong.

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

Purpose4/5

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

Opens with a specific verb and resource ('Create a server-side moderation rule') and immediately enumerates the five trigger families the tool covers, so the agent knows exactly what class of object is produced. It differentiates itself from update/delete/list_automod_rule by the verb alone rather than naming them, which is the only thing keeping it from a 5.

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?

Gives real selection guidance between trigger modes: 'For slur or hate-speech filtering prefer trigger keyword_preset with the slurs preset' tells the agent which path to take rather than leaving it to guess. It does not state prerequisites (permissions needed) or when not to create a rule, so it falls short of explicit when/when-not/alternative coverage.

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