discord-mcp

Get audit log

discord_get_audit_log

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-onlyreadOnlyHintyesDoes not modify your server.
DestructivedestructiveHintn/aNot declared: it only applies to tools that write.
IdempotentidempotentHintn/aNot declared.
Open worldopenWorldHintyesInteracts with an external system: Discord.

Annotations are hints the server declares. Clients use them to decide when to ask you before a call.

Parameters

ParameterTypeRulesDescription
guild_idrequiredstring
pattern ^\d{17,20}$
Discord server (guild) ID (snowflake).
limitoptionalinteger
1 to 100default 25
How many recent entries to fetch (1–100). Default 25.
action_typeoptionalnumber or integer
number:
one of 69 values110111213141520212223242526272830313240414250515260616272737475808182838485909192100101102110111112121130131132140141142143144145146150151163164165166167190191192193
integer: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.

FieldType
entriesrequiredarray of objects
id (nested, level 1)requiredstring
action (nested, level 1)requirednumber
executor (nested, level 1)requiredstring or null
target (nested, level 1)requiredstring or null
reason (nested, level 1)requiredstring or null
createdAt (nested, level 1)requiredstring

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
  }
}