Skip to main content
Glama

discord_get_audit_log

Read-only

Fetch a Discord server's audit log to review administrative actions—bans, kicks, role or channel changes—with executor, target, reason, and timestamp. Requires View Audit Log permission; read-only.

Instructions

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.

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": "discord_get_audit_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many recent entries to fetch (1–100). Default 25.
guild_idYesDiscord server (guild) ID (snowflake).
action_typeNoOptional Discord AuditLogEvent numeric ID to filter by. Common IDs: 12 = ChannelDelete, 20 = MemberKick, 22 = MemberBanAdd, 23 = MemberBanRemove, 24 = MemberUpdate (nickname, timeout), 25 = MemberRoleUpdate, 32 = RoleDelete, 72 = MessageDelete. Discord's full list has more. Omit for all action types.

Output Schema

NameRequiredDescriptionDefault
entriesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.5.0
    • removedInput schema / properties / action_type / anyOf
      Removed value: -[
      -  {
      -    "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": "number"
      -  },
      -  {
      -    "maximum": 9007199254740991,
      -    "minimum": 1,
      -    "type": "integer"
      -  }
      -]
    • changedInput schema / properties / action_type / description
      Previous value: -"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."New value: +"Optional Discord AuditLogEvent numeric ID to filter by. Common IDs: 12 = ChannelDelete, 20 = MemberKick, 22 = MemberBanAdd, 23 = MemberBanRemove, 24 = MemberUpdate (nickname, timeout), 25 = MemberRoleUpdate, 32 = RoleDelete, 72 = MessageDelete. Discord's full list has more. Omit for all action types."
    • addedInput schema / properties / action_type / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / action_type / minimum
      Added value: +1
    • addedInput schema / properties / action_type / type
      Added value: +"integer"
  2. Changed6 schema fields changedv2.2.1
    • removedOutput schema / properties / entries / items / properties / executor / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / entries / items / properties / executor / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / entries / items / properties / reason / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / entries / items / properties / reason / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / entries / items / properties / target / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / entries / items / properties / target / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed2 schema fields changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / action_type / anyOf
      Previous value: -[
      -  {
      -    "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
      -    ],
      -    "type": "number"
      -  },
      -  {
      -    "maximum": 9007199254740991,
      -    "minimum": 1,
      -    "type": "integer"
      -  }
      -]New value: +[
      +  {
      +    "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": "number"
      +  },
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 1,
      +    "type": "integer"
      +  }
      +]
  4. Changed9 schema fields changedv2.0.0
    • addedInput schema / properties / action_type / anyOf
      Added value: +[
      +  {
      +    "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
      +    ],
      +    "type": "number"
      +  },
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 1,
      +    "type": "integer"
      +  }
      +]
    • changedInput schema / properties / action_type / description
      Previous value: -"Optional Discord AuditLogEvent numeric ID to filter by (e.g. 22 = MemberBanAdd). Omit for all action types."New value: +"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."
    • removedInput schema / properties / action_type / type
      Removed value: -"number"
    • addedInput schema / properties / guild_id / pattern
      Added value: +"^\\d{17,20}$"
    • addedInput schema / properties / limit / default
      Added value: +25
    • addedInput schema / properties / limit / maximum
      Added value: +100
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "entries": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "action": {
      +            "type": "number"
      +          },
      +          "createdAt": {
      +            "type": "string"
      +          },
      +          "executor": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "reason": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "target": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "action",
      +          "executor",
      +          "target",
      +          "reason",
      +          "createdAt"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "entries"
      +  ],
      +  "type": "object"
      +}
  5. Changed3 schema fields changedv1.6.0
    • changedInput schema / properties / action_type / description
      Previous value: -"Optional: filter by Discord action type ID."New value: +"Optional Discord AuditLogEvent numeric ID to filter by (e.g. 22 = MemberBanAdd). Omit for all action types."
    • addedInput schema / properties / guild_id / description
      Added value: +"Discord server (guild) ID (snowflake)."
    • changedInput schema / properties / limit / description
      Previous value: -"1–100, default 25."New value: +"How many recent entries to fetch (1–100). Default 25."
  6. Addedv1.5.0
  7. Removedv1.0.0
  8. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered and the 'Read-only' sentence is redundant. The genuinely additive content is the View Audit Log permission requirement and the note that entries carry actor and timestamp context, which annotations do not express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three front-loaded sentences with no filler, the purpose leading and the permission caveat in the middle. Minor waste: 'Read-only' restates readOnlyHint and the field list in 'Returns { entries: [...] } with id, action, ...' duplicates the existing output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter read tool with full schema coverage, an output schema, and read-only annotations, the description covers purpose, precondition, and result shape. Nothing an agent needs in order to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: limit, guild_id and action_type are all documented in-schema, including common AuditLogEvent IDs. The description adds no filtering or pagination semantics beyond what the schema already provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Fetch the server's audit log') and enumerates the content (bans, kicks, role/channel changes, actor, timestamp), so an agent knows exactly what data comes back. It stops short of distinguishing itself from the nearby sibling discord_audit_permissions, which an agent could plausibly confuse with an audit-log reader.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by 'Requires the View Audit Log permission', which usefully flags a precondition the agent must satisfy before calling. However, there is no explicit statement of when to prefer this over a sibling (e.g. permissions auditing) and no when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools