Get audit log
discord_
Read-only
- Toolset
- Moderation
moderation - Discord permission
- View Audit Log
- Context cost
- 431 tokens, estimated1,722 bytes of definition, divided by 4
Fetch the server's audit log, the record of administrative actions (bans, kicks, role/channel changes, etc.) with who performed them and when. Requires the View Audit Log permission. Returns { entries: [...] } with id, action, executor, target, reason, createdAt. Read-only.
Risk and annotations
Read-onlyreadOnlyHint | yes | Does not modify your server. |
|---|---|---|
DestructivedestructiveHint | n/a | Not declared: it only applies to tools that write. |
IdempotentidempotentHint | n/a | Not declared. |
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). |
| limitoptional | integer | 1 to 100default 25 | How many recent entries to fetch (1–100). Default 25. |
| action_ | number or integer | number: one of 69 values110111213141520212223242526272830313240414250515260616272737475808182838485909192100101102110111112121130131132140141142143144145146150151163164165166167190191192193integer:at least 1 | Optional Discord AuditLogEvent numeric ID to filter by (e.g. 22 = MemberBanAdd). Accepts event IDs newer than the bundled enum. Omit for all action types. |
Output
Declared by outputSchema: clients receive this shape as structuredContent.
| Field | Type |
|---|---|
| entriesrequired | array of objects |
| id (nested, level 1)required | string |
| action (nested, level 1)required | number |
| executor (nested, level 1)required | string or null |
| target (nested, level 1)required | string or null |
| reason (nested, level 1)required | string or null |
| createdAt (nested, level 1)required | string |
Related tools
Moderation has no other tool
Raw definition (1,722 bytes)
{
"name": "discord_get_audit_log",
"description": "Fetch the server's audit log, the record of administrative actions (bans, kicks, role/channel changes, etc.) with who performed them and when. Requires the View Audit Log permission. Returns { entries: [...] } with id, action, executor, target, reason, createdAt. Read-only.",
"inputSchema": {
"type": "object",
"properties": {
"guild_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "Discord server (guild) ID (snowflake)."
},
"limit": {
"default": 25,
"description": "How many recent entries to fetch (1–100). Default 25.",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"action_type": {
"description": "Optional Discord AuditLogEvent numeric ID to filter by (e.g. 22 = MemberBanAdd). Accepts event IDs newer than the bundled enum. Omit for all action types.",
"anyOf": [
{
"type": "number",
"enum": [
1,
10,
11,
12,
13,
14,
15,
20,
21,
22,
23,
24,
25,
26,
27,
28,
30,
31,
32,
40,
41,
42,
50,
51,
52,
60,
61,
62,
72,
73,
74,
75,
80,
81,
82,
83,
84,
85,
90,
91,
92,
100,
101,
102,
110,
111,
112,
121,
130,
131,
132,
140,
141,
142,
143,
144,
145,
146,
150,
151,
163,
164,
165,
166,
167,
190,
191,
192,
193
]
},
{
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
}
]
}
},
"required": [
"guild_id"
],
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"action": {
"type": "number"
},
"executor": {
"type": [
"string",
"null"
]
},
"target": {
"type": [
"string",
"null"
]
},
"reason": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"action",
"executor",
"target",
"reason",
"createdAt"
],
"additionalProperties": false
}
}
},
"required": [
"entries"
],
"additionalProperties": false
},
"annotations": {
"title": "Get audit log",
"readOnlyHint": true,
"openWorldHint": true
}
}