audit_log_get
Fetch Discord guild audit log entries to investigate moderation actions such as member kicks, with filters and pagination.
Instructions
Purpose: Fetch audit log entries for a guild.
When to use: investigate "who kicked X?", post-incident forensics.
Example: {guild_id:"999000999000999000", limit:50, action_type:20} (action_type 20 = MEMBER_KICK)
Pagination: pass before as the last entry's oldest_id to fetch older entries. Discord returns entries in descending ID order; repeat until a page is empty.
Returns: {entries:[{id, target_id, user_id, action_type, reason}], count, oldest_id?}. Structured reason values remain raw moderator-controlled data; the human-readable text response fences 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": {
"guild_id": "<guild_id>"
},
"name": "audit_log_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max entries (1-100, default 50) | |
| before | No | Return entries with ID less than this entry ID | |
| user_id | No | Filter to entries triggered by this user | |
| guild_id | Yes | Guild to query | |
| action_type | No | Filter by Discord audit action type |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||