automod_create_rule
Create Discord AutoMod rules to filter keywords, block spam, guard against mention raids, or enforce member-profile checks by defining triggers, actions, exemptions, and audit reasons.
Instructions
Purpose: Create an AutoMod rule.
When to use: - Add a keyword filter, spam blocker, mention-raid guard, etc.
trigger_metadata is conditional on trigger_type: - 1 KEYWORD → keyword_filter, regex_patterns, allow_list - 3 SPAM → no metadata - 4 KEYWORD_PRESET → presets, allow_list - 5 MENTION_SPAM → mention_total_limit, mention_raid_protection_enabled - 6 MEMBER_PROFILE → keyword_filter, regex_patterns, allow_list
Returns: {id, name, trigger_type, enabled}.
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": {
"guild_id": "<guild_id>",
"name": "<name>",
"event_type": "<event_type>",
"trigger_type": "<trigger_type>",
"actions": "<actions>"
},
"name": "automod_create_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Rule name | |
| actions | Yes | Actions to take when the rule fires | |
| enabled | No | Whether the rule is active (default true) | |
| guild_id | Yes | Target guild | |
| event_type | Yes | AutoMod event type (1 MESSAGE_SEND, 2 MEMBER_UPDATE) | |
| audit_reason | No | Reason recorded in audit log (X-Audit-Log-Reason header) | |
| exempt_roles | No | Roles exempt from this rule (max 20) | |
| trigger_type | Yes | AutoMod trigger type (1 KEYWORD, 3 SPAM, 4 KEYWORD_PRESET, 5 MENTION_SPAM, 6 MEMBER_PROFILE) | |
| exempt_channels | No | Channels exempt from this rule (max 50) | |
| trigger_metadata | No | AutoMod trigger metadata (fields valid per trigger_type) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||