Home / Servers / Discord API / create_auto_moderation_rule

POST /guilds/{guild_id}/auto-moderation/rules

An MCP tool from the Discord API server, hosted on mcp.hjlabs.in.

POST /guilds/{guild_id}/auto-moderation/rules [POST /guilds/{guild_id}/auto-moderation/rules]

Name on the gateway: discord_api__create_auto_moderation_rule · may change things.

Parameters

NameTypeDescription
guild_id requiredstringguild_id parameter
name requiredstring
event_type requiredintegerA user submitted a message to a channel
actionsarray
enabledboolean
exempt_rolesarray
exempt_channelsarray
trigger_type required4Check if content contains words from a list of keywords or matches regex
trigger_metadata requiredobject

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "discord_api__create_auto_moderation_rule",
  "arguments": {
    "guild_id": "…",
    "name": "…",
    "event_type": 0,
    "trigger_type": "…",
    "trigger_metadata": "…"
  }
}

Or connect the Discord API server directly, which lists 250 tools including this one:

Run in your terminal
claude mcp add --transport http hj-discord-api https://mcp.hjlabs.in/mcp/discord-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the post /guilds/{guild_id}/auto-moderation/rules tool with guild_id set to ….

More from Discord API