Skip to main content
Glama

discord_get_audit_log

Read-only

Retrieve a Discord server's audit log to see administrative actions like bans, kicks, and role changes, including who performed them and when. Filter entries by action type.

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 (e.g. 22 = MemberBanAdd). Accepts event IDs newer than the bundled enum. Omit for all action types.

Output Schema

NameRequiredDescriptionDefault
entriesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. 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"
      +  }
      +]
  3. 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"
      +}
  4. 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."
  5. Addedv1.5.0
  6. Removedv1.0.0
  7. 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, and the description reinforces the safety profile with 'Read-only' plus the required 'View Audit Log' permission. It also pre-announces the return envelope ({ entries: [...] } with named fields), which is behavioral value beyond annotations; only pagination/cursor behavior is unaddressed.

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

Conciseness5/5

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

Three tight sentences: what it is, what it needs, what it returns. No redundancy, and the core purpose is front-loaded in the first clause.

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

Completeness4/5

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

Covers purpose, permission prerequisite, and return shape even though an output schema exists, so an agent can call it confidently. The missing piece is disambiguation from the similarly named discord_read_audit_trail sibling.

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%, so guild_id, limit, and action_type are already fully documented, including the enum and the 'newer than the bundled enum' note. The description adds nothing about parameters, so 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?

States a specific verb and resource ('Fetch the server's audit log') and enumerates the content type (bans, kicks, role/channel changes, executor, timestamp). It's clear and concrete, but it never distinguishes itself from the sibling discord_read_audit_trail, which an agent could easily confuse with this Discord audit log.

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?

The prerequisite ('Requires the View Audit Log permission') is stated, which is useful context, but there is no explicit when-to-use guidance or exclusion vs. alternatives such as discord_read_audit_trail. Usage is only implied by the description of contents.

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