Skip to main content
Glama
cappyeo

discord-mcp

audit_log_get

Read-onlyIdempotent

Fetch audit log entries for a Discord guild to see who did what, such as kicks, for post-incident forensics.

Instructions

Purpose: Fetch audit log entries for a guild.

When to use: investigate "who kicked X?", post-incident forensics.

Example: {guild_id:"999000999000999000", limit:50, action_type:20} (action_type 20 = MEMBER_KICK)

Pagination: pass before as the last entry's oldest_id to fetch older entries. Discord returns entries in descending ID order; repeat until a page is empty.

Returns: {entries:[{id, target_id, user_id, action_type, reason}], count, oldest_id?}. Structured reason values remain raw moderator-controlled data; the human-readable text response fences them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax entries (1-100, default 50)
beforeNoReturn entries with ID less than this entry ID
user_idNoFilter to entries triggered by this user
guild_idYesGuild to query
action_typeNoFilter by Discord audit action type

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.28.0
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": {},
      -    "properties": {
      -      "count": {
      -        "type": "number"
      -      },
      -      "entries": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "action_type": {
      -              "maximum": 9007199254740991,
      -              "minimum": -9007199254740991,
      -              "type": "integer"
      -            },
      -            "id": {
      -              "type": "string"
      -            },
      -            "reason": {
      -              "type": "string"
      -            },
      -            "target_id": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "user_id": {
      -              "anyOf": [
      -                {
      -                  "description": "Discord user ID",
      -                  "pattern": "^\\d{17,20}$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "target_id",
      -            "user_id",
      -            "action_type"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "oldest_id": {
      -        "description": "Oldest entry ID; pass as before for the next page",
      -        "pattern": "^\\d{17,20}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "entries",
      -      "count"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "category": {
      -        "enum": [
      -          "client",
      -          "server"
      -        ],
      -        "type": "string"
      -      },
      -      "code": {
      -        "type": "string"
      -      },
      -      "recovery_hint": {
      -        "type": "string"
      -      },
      -      "retriable": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "code",
      -      "retriable",
      -      "category",
      -      "recovery_hint"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": {},
      +    "properties": {
      +      "count": {
      +        "type": "number"
      +      },
      +      "entries": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "action_type": {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            "id": {
      +              "type": "string"
      +            },
      +            "reason": {
      +              "type": "string"
      +            },
      +            "target_id": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "user_id": {
      +              "anyOf": [
      +                {
      +                  "description": "Discord user ID",
      +                  "pattern": "^\\d{17,20}$",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "target_id",
      +            "user_id",
      +            "action_type"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "oldest_id": {
      +        "description": "Oldest entry ID; pass as before for the next page",
      +        "pattern": "^\\d{17,20}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "entries",
      +      "count"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "category": {
      +        "enum": [
      +          "client",
      +          "server"
      +        ],
      +        "type": "string"
      +      },
      +      "code": {
      +        "type": "string"
      +      },
      +      "recovery_hint": {
      +        "type": "string"
      +      },
      +      "retriable": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "retriable",
      +      "category",
      +      "recovery_hint"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed2 schema fields changedv0.26.0
    • addedInput schema / properties / before
      Added value: +{
      +  "description": "Return entries with ID less than this entry ID",
      +  "pattern": "^\\d{17,20}$",
      +  "type": "string"
      +}
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": {},
      -    "properties": {
      -      "count": {
      -        "type": "number"
      -      },
      -      "entries": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "action_type": {
      -              "maximum": 9007199254740991,
      -              "minimum": -9007199254740991,
      -              "type": "integer"
      -            },
      -            "id": {
      -              "type": "string"
      -            },
      -            "reason": {
      -              "type": "string"
      -            },
      -            "target_id": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "user_id": {
      -              "anyOf": [
      -                {
      -                  "description": "Discord user ID",
      -                  "pattern": "^\\d{17,20}$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "target_id",
      -            "user_id",
      -            "action_type"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "entries",
      -      "count"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "category": {
      -        "enum": [
      -          "client",
      -          "server"
      -        ],
      -        "type": "string"
      -      },
      -      "code": {
      -        "type": "string"
      -      },
      -      "recovery_hint": {
      -        "type": "string"
      -      },
      -      "retriable": {
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "code",
      -      "retriable",
      -      "category",
      -      "recovery_hint"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": {},
      +    "properties": {
      +      "count": {
      +        "type": "number"
      +      },
      +      "entries": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "action_type": {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            "id": {
      +              "type": "string"
      +            },
      +            "reason": {
      +              "type": "string"
      +            },
      +            "target_id": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "user_id": {
      +              "anyOf": [
      +                {
      +                  "description": "Discord user ID",
      +                  "pattern": "^\\d{17,20}$",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "target_id",
      +            "user_id",
      +            "action_type"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "oldest_id": {
      +        "description": "Oldest entry ID; pass as before for the next page",
      +        "pattern": "^\\d{17,20}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "entries",
      +      "count"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "category": {
      +        "enum": [
      +          "client",
      +          "server"
      +        ],
      +        "type": "string"
      +      },
      +      "code": {
      +        "type": "string"
      +      },
      +      "recovery_hint": {
      +        "type": "string"
      +      },
      +      "retriable": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "retriable",
      +      "category",
      +      "recovery_hint"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. First observedv0.22.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already carry readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds valuable behavior beyond that: descending-ID pagination semantics (pass 'before' as the last entry's oldest_id, repeat until empty) and a raw-data warning that structured 'reason' values are unfenced moderator-controlled input. This enriches what annotations alone provide. No contradiction with annotations.

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?

Bold section labels (Purpose, When to use, Example, Pagination, Returns) make it scannable and front-loaded. Each block earns its place — the Returns block slightly overlaps with the output schema that exists, but the raw-data fencing caveat adds non-redundant value. Slightly long but information-dense.

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 query tool with 5 parameters, an output schema, and full annotations, the description covers everything an agent needs: purpose, when to invoke, a concrete example, the non-obvious pagination flow, and a data-integrity caveat about reason values. The tricky parts (action_type mapping, 'before' semantics, descending order) are all handled explicitly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the schema already documents every parameter. The description adds meaning beyond the schema: the action_type example maps 20 to MEMBER_KICK (concrete semantic), and the pagination section explains how 'before' works mechanically with oldest_id. This pushes it above baseline.

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 opens with a specific verb-resource pair ('Fetch audit log entries for a guild'), which is precise and unambiguous. The example with action_type 20 = MEMBER_KICK and the use cases ('who kicked X?', post-incident forensics) reinforce the purpose. No sibling tool handles audit logs, so it inherently stands apart.

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 'When to use' section gives concrete investigative scenarios and a worked example, giving the agent clear context. It explains pagination mechanics but does not explicitly name alternatives or state when NOT to use it (e.g., for live member state, prefer members_get). The guidance is clear though not exhaustive.

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