Bulk delete messages
bulk_delete_messagesDelete 2–100 recent Discord messages at once, optionally filtered by author or text. Preview the matching batch and confirm with a token before removal.
Instructions
Delete many recent messages at once (2 to 100), optionally filtered by author or text. Discord cannot bulk delete messages older than 14 days. Safe to call directly: the first call returns how many it would remove, with a sample of them, plus a confirm_token; repeating the call with the token deletes those same messages. Messages posted after the preview are left alone, so it works in a busy channel, such as during a raid.
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": {
"channel": "<channel>"
},
"name": "bulk_delete_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | How many recent messages to scan. Default 50. | |
| guild | No | Guild (server) name or ID. Omit to use the default guild. | |
| channel | Yes | Channel name or ID. | |
| dry_run | No | If true, nothing is changed: the result shows what this call would do. | |
| contains | No | Only delete messages containing this text. | |
| from_author | No | Only delete messages whose author name matches this. | |
| confirm_token | No | The token from this exact action's preview. Where the app can show a confirmation dialog, calling with it asks the user there, and it happens only if they agree. |