Prune inactive members
discord_
DestructiveDry run by default
- Toolset
- Members
members - Discord permissions
- Manage Server and Kick Members
- Context cost
- 364 tokens, estimated1,457 bytes of definition, divided by 4
Remove members who have been inactive (no roles, not seen) for a number of days. SAFE BY DEFAULT: dry_run is true unless explicitly set to false, so call it first to preview the count, then re-call with dry_run:false to actually remove them. Removal is irreversible (members must rejoin). Requires the Manage Server and Kick Members permissions (Administrator when the server has the PRUNE_REQUIRES_ADMIN feature).
Risk and annotations
Read-onlyreadOnlyHint | no | Can modify your server. |
|---|---|---|
DestructivedestructiveHint | yes | May perform destructive updates, so clients can ask before running it. |
IdempotentidempotentHint | no | Repeating the call can have an additional effect. |
Open worldopenWorldHint | yes | Interacts with an external system: Discord. |
Annotations are hints the server declares. Clients use them to decide when to ask you before a call.
Parameters
| Parameter | Type | Rules | Description |
|---|---|---|---|
| guild_ | string | pattern ^\d{17,20}$ | Discord server (guild) ID (snowflake). |
| daysrequired | integer | 1 to 30 | Inactivity threshold in days (1–30). |
| rolesoptional | array of strings | none | Optional role IDs (snowflakes) to include; by default only members with no roles are counted. A member with roles is counted only when every role they hold is in this list. |
| dry_ | boolean | default true | If true (default), only returns the count that would be pruned without removing anyone. Set false to actually prune. |
| reasonoptional | string | none | Optional reason recorded in the server audit log. |
Output
This tool declares no output schema. Its description says what it returns; this page shows no example rather than invent one.
Related tools
Also in Members
-
List members, Read-only
discord_list_ members -
Get member info, Read-only
discord_get_ member_ info -
Kick member, Destructive
discord_kick_ member -
Ban member, Destructive
discord_ban_ member -
Unban member, Write
discord_unban_ member -
Timeout member, Write
discord_timeout_ member -
Search members, Read-only
discord_search_ members -
Set nickname, Write
discord_set_ nickname -
List bans, Read-only
discord_list_ bans -
Bulk ban, Destructive
discord_bulk_ ban
Raw definition (1,457 bytes)
{
"name": "discord_prune_members",
"description": "Remove members who have been inactive (no roles, not seen) for a number of days. SAFE BY DEFAULT: dry_run is true unless explicitly set to false, so call it first to preview the count, then re-call with dry_run:false to actually remove them. Removal is irreversible (members must rejoin). Requires the Manage Server and Kick Members permissions (Administrator when the server has the PRUNE_REQUIRES_ADMIN feature).",
"inputSchema": {
"type": "object",
"properties": {
"guild_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "Discord server (guild) ID (snowflake)."
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 30,
"description": "Inactivity threshold in days (1–30)."
},
"roles": {
"description": "Optional role IDs (snowflakes) to include; by default only members with no roles are counted. A member with roles is counted only when every role they hold is in this list.",
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{17,20}$"
}
},
"dry_run": {
"default": true,
"description": "If true (default), only returns the count that would be pruned without removing anyone. Set false to actually prune.",
"type": "boolean"
},
"reason": {
"description": "Optional reason recorded in the server audit log.",
"type": "string"
}
},
"required": [
"guild_id",
"days"
],
"additionalProperties": false
},
"annotations": {
"title": "Prune inactive members",
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true
}
}