Bulk delete messages
bulk_delete_messagesDelete multiple recent Discord messages at once, optionally filtered by author or text, with a preview and confirmation token to prevent accidental 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 them.
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 | ||
| 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. |