Skip to main content
Glama

discord_get_audit_log

Read-only

Fetch a Discord server's audit log to trace administrative actions like bans, kicks, and role changes. View who performed each action, when, and why, with optional filtering 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.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
entriesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +  }
      +]
  2. 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"
      +}
  3. 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."
  4. Addedv1.5.0
  5. Removedv1.0.0
  6. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces this with 'Read-only'. It adds useful behavioral context beyond the annotations by disclosing the permission requirement and the exact response shape: { entries: [...] } with named fields. This gives the agent a accurate expectation of what the call does and what it needs in advance.

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?

The description is three compact sentences with no filler. It front-loads the core operation, then adds the permission requirement and return shape, each sentence contributing meaningful information without redundancy.

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 read-only tool with one required parameter, a thorough input schema, and an output schema available, the description covers the essential operational details: what the resource is, the required permission, and the response format. Nothing needed for correct selection or invocation 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%, so every parameter already has an explanatory description: guild_id, limit, and action_type. The tool description does not add much parameter-specific semantics beyond the schema, so the baseline score of 3 is appropriate.

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

Purpose5/5

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

The description names a specific verb and resource: 'Fetch the server's audit log', and explains what the log contains (administrative actions, who performed them, when). This clearly distinguishes it from the many sibling message/channel/member tools, since it is the only audit-log operation in the set.

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

Usage Guidelines4/5

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

The description provides clear context for when this tool is relevant and states the required permission ('View Audit Log'), which is an important access prerequisite. It does not explicitly enumerate alternatives or exclusions, but no sibling tool offers a comparable audit-log capability, so that omission is minor.

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