configure_autoban
Configure AutoBan join and profile screening rules, alert log channel, and exempt roles/users enforcing 1 / 3 / 50 Free/Pro/Enterprise rule caps.
Overview
Manages AutoBanConfig automated member screening rules across all 6 rule types (match_username, username_invites, account_age, no_avatar, impersonation, multi_signal).
Enforces exact subscription rule caps via enforceAutoBanPremium (Free: 1 rule, Pro: 3 rules, Enterprise: 50 rules), verifies logChannelId against guild channels, and validates regex rules with isSafeRegexPattern.
Permissions
- Required Scopes
- mcp:write
- Discord Role Access
- Real Admin or active Temp Admin.
- Server-Side Guard
- checkManageGuild + cross-guild channel check + ReDoS regex guard + enforceAutoBanPremium
- Subscription Tier
- Free: max 1 rule. Pro: max 3 rules. Enterprise: max 50 rules.
Input Schema
JSON Schema enforced by the server prior to RBAC and tier validation. Unknown properties are rejected strictly.
{
"type": "object",
"properties": {
"guildId": {
"type": "string",
"pattern": "^\\d{17,22}$",
"description": "Discord server (guild) snowflake ID."
},
"mode": {
"type": "string",
"enum": [
"preview",
"apply"
],
"default": "apply",
"description": "Use preview to inspect validated diffs before writing, or apply to save."
},
"enabled": {
"type": "boolean",
"description": "Enable or disable AutoBan join screening."
},
"logChannelId": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{17,22}$"
},
{
"type": "null"
}
],
"description": "Channel ID where AutoBan alerts are sent."
},
"watchProfileUpdates": {
"type": "boolean",
"description": "Re-evaluate rules when members change their display name or avatar."
},
"protectStaffImpersonation": {
"type": "boolean",
"description": "Enable built-in staff impersonation guard."
},
"exemptRoleIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{17,22}$"
},
"maxItems": 100,
"description": "Role IDs exempt from AutoBan."
},
"exemptUserIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{17,22}$"
},
"maxItems": 100,
"description": "User IDs exempt from AutoBan."
},
"allowedInviteCodes": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"maxItems": 50,
"description": "Invite codes permitted in usernames for username_invites rules."
},
"defaultDmMessage": {
"type": "string",
"minLength": 1,
"maxLength": 800,
"description": "Default DM sent to removed members when dmMember is enabled."
},
"includeAppealLinkInDm": {
"type": "boolean",
"description": "Include the server appeal link in AutoBan DM notices."
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Optional stable rule ID."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "Human-readable rule name."
},
"enabled": {
"type": "boolean",
"default": true,
"description": "Whether this screening rule is active."
},
"type": {
"type": "string",
"enum": [
"match_username",
"username_invites",
"account_age",
"no_avatar",
"impersonation",
"multi_signal"
],
"description": "Join/profile screening rule type."
},
"action": {
"type": "string",
"enum": [
"ban",
"softban",
"kick"
],
"default": "ban",
"description": "Enforcement action when matched."
},
"deleteMessageSeconds": {
"type": "integer",
"default": 0,
"description": "Message history purge duration in seconds on ban."
},
"dmMember": {
"type": "boolean",
"default": false,
"description": "Send a DM explanation before enforcing the action."
},
"customDmMessage": {
"type": "string",
"maxLength": 800,
"default": "",
"description": "Optional rule-specific DM message."
},
"auditReason": {
"type": "string",
"maxLength": 240,
"default": "",
"description": "Optional Discord audit log reason."
},
"words": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"maxItems": 150,
"default": [],
"description": "Blocked words, names, or regex patterns (required for match_username and impersonation)."
},
"wildcard": {
"type": "boolean",
"description": "Whether substring matching is enabled."
},
"matchMode": {
"type": "string",
"enum": [
"contains",
"exact",
"starts_with",
"ends_with",
"wildcard",
"regex"
],
"default": "contains",
"description": "Pattern match strategy (regex patterns are strictly ReDoS checked)."
},
"checkDisplayName": {
"type": "boolean",
"default": true,
"description": "Also check global display name / nickname."
},
"normalizeHomoglyphs": {
"type": "boolean",
"default": true,
"description": "Normalize lookalike Unicode characters."
},
"minAgeValue": {
"type": "integer",
"minimum": 1,
"maximum": 36500,
"default": 24,
"description": "Minimum account age numeric threshold."
},
"minAgeUnit": {
"type": "string",
"enum": [
"minutes",
"hours",
"days"
],
"default": "hours",
"description": "Unit for minAgeValue."
},
"noAvatarMaxAgeHours": {
"type": "integer",
"minimum": 0,
"maximum": 8760,
"default": 0,
"description": "Optional max account age in hours for no_avatar rules (0 = any age)."
},
"comboRequireNoAvatar": {
"type": "boolean",
"default": true,
"description": "For multi_signal rules, require the account to have no custom avatar."
},
"comboMaxAgeHours": {
"type": "integer",
"minimum": 1,
"maximum": 8760,
"default": 72,
"description": "For multi_signal rules, maximum account age in hours."
},
"comboRequireDigitSpam": {
"type": "boolean",
"default": false,
"description": "For multi_signal rules, require digit-heavy spam username detection."
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"maxItems": 50,
"description": "Join screening rules (capped by server plan: Free 1, Pro 3, Enterprise 50)."
}
},
"required": [
"guildId"
],
"additionalProperties": false
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| guildId | string | Required | Discord server (guild) snowflake ID. |
| mode | string | Optional (apply) | Use preview to inspect validated diffs before writing, or apply to save. Allowed: preview | apply |
| enabled | boolean | Optional | Enable or disable AutoBan join screening. |
| logChannelId | string | null | Optional | Channel ID where AutoBan alerts are sent. |
| watchProfileUpdates | boolean | Optional | Re-evaluate rules when members change their display name or avatar. |
| protectStaffImpersonation | boolean | Optional | Enable built-in staff impersonation guard. |
| exemptRoleIds | array<string> | Optional | Role IDs exempt from AutoBan. |
| exemptUserIds | array<string> | Optional | User IDs exempt from AutoBan. |
| allowedInviteCodes | array<string> | Optional | Invite codes permitted in usernames for username_invites rules. |
| defaultDmMessage | string | Optional | Default DM sent to removed members when dmMember is enabled. |
| includeAppealLinkInDm | boolean | Optional | Include the server appeal link in AutoBan DM notices. |
| rules | array<object> | Optional | Join screening rules (capped by server plan: Free 1, Pro 3, Enterprise 50). |
Example
Preview enabling AutoBan with an account-age join screening rule.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "configure_autoban",
"arguments": {
"guildId": "1200000000000000000",
"mode": "preview",
"enabled": true,
"logChannelId": "1200000000000000011",
"rules": [
{
"name": "Block Brand-New Accounts",
"type": "account_age",
"action": "kick",
"minAgeValue": 24,
"minAgeUnit": "hours"
}
]
}
}
}Response
Validated preview or saved AutoBan configuration with tier cap metadata.
{
"mode": "preview",
"valid": true,
"guildId": "1200000000000000000",
"planTier": "free",
"ruleCount": 1,
"maxRules": 1,
"changes": [
{
"tool": "configure_autoban",
"module": "autoban",
"field": "enabled",
"before": false,
"after": true
}
]
}Errors
| Error Code | Condition | Resolution |
|---|---|---|
| UNAUTHORIZED | Missing, expired, or revoked Bearer access token or scoped Personal Access Token. | Re-authenticate through OAuth 2.1 or create a fresh token in https://mcp.taicket.xyz/account. |
| FORBIDDEN | Token lacks the required OAuth scope, the guild is outside allowedGuildIds, or caller lacks live Discord RBAC permissions. | Grant the required scope during consent or confirm your Discord server role permissions. |
| RATE_LIMITED | Caller exceeded the per-user sliding-window request limit. | Wait for the Retry-After window before issuing another request. |
| VALIDATION_ERROR | Input arguments failed Zod schema validation or contained invalid Discord snowflakes. | Inspect the parameter schema and supply valid Discord snowflake IDs and field types. |
| CROSS_GUILD_RESOURCE | A referenced channel, category, or role does not belong to the specified guildId. | Call get_server_topology for the target server and reference only resources returned for that guild. |
| TIER_UPGRADE_REQUIRED | The requested module, quota, or option requires a Pro or Enterprise subscription. | Review current plan limits with get_server_configuration or upgrade at https://taicket.xyz/dashboard/{guildId}/premium. |
Behavior
- Returns TIER_UPGRADE_REQUIRED when the submitted rules array exceeds the server plan cap (1 / 3 / 50).
- Requires at least one word or pattern for match_username and impersonation rules.
- Validates all regex matchMode patterns with isSafeRegexPattern to block ReDoS.
- Verifies logChannelId and exemptRoleIds belong to the target guild.
Related Tools