Skip to main content
Glama
Discord MCP - Discord server management MCP for AI agents

Discord MCP - Discord server management MCP for AI agents

Ban member

ban_member
Destructive

Bans a Discord server user, optionally removes their recent messages, and can target members who already left by user ID.

Instructions

Ban a user from the server, optionally deleting their recent messages. Works on users who already left (pass their user ID). Safe to call directly: the first call changes nothing and returns a preview plus a confirm_token; repeating the call with the token performs the ban. Relay the preview for the user's go-ahead.

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": {
      "user": "<user>"
    },
    "name": "ban_member"
  }
}

Input Schema

NameRequiredDescriptionDefault
userYesMember name, or a user ID for someone not in the server.
guildNoGuild (server) name or ID. Omit to use the default guild.
reasonNoThe reason recorded in the server's audit log.
dry_runNoIf true, nothing is changed: the result shows what this call would do.
confirm_tokenNoThe token from this exact action's preview. Where the app can show a confirmation dialog, calling with it asks the user there, and it happens only if they agree.
delete_message_secondsNoAlso delete their messages from the last N seconds, up to 604800 (7 days).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.2
    • addedInput schema / properties / dry_run / description
      Added value: +"If true, nothing is changed: the result shows what this call would do."
    • addedInput schema / properties / reason / description
      Added value: +"The reason recorded in the server's audit log."
  2. Changed2 schema fields changedv1.4.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / confirm_token / description
      Added value: +"The token from this exact action's preview. Where the app can show a confirmation dialog, calling with it asks the user there, and it happens only if they agree."
  3. Changed1 schema field changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
  4. First observedv1.0.2

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say destructiveHint=true, readOnlyHint=false; the description goes well beyond by disclosing the two-phase preview/confirm_token protocol, which is the single most surprising trait of a tool named 'ban' that changes nothing on first invocation. It also surfaces the side effect (deleting recent messages) and that the reason is written to the audit log, so an agent can warn the user what is destroyed.

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?

Four short sentences, front-loaded with what the tool does, then the non-obvious confirmation protocol, then the agent's obligation to relay the preview. No filler, and the ordering puts the safety-critical flow before the instruction to the caller.

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?

For a destructive six-parameter tool with no output schema, the description covers the mutation path, the preview contract, and the departed-user edge case, which is most of what an agent needs. Minor gaps remain: required permissions or hierarchy constraints, and whether the ban can be undone (relevant given unban_member exists).

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 would be 3, but the description adds meaning the schema does not carry: 'user' may be a bare user ID specifically for someone no longer in the server, and confirm_token is the token 'from this exact action's preview' that actually performs the ban. The dry_run parameter is left to its schema text rather than being tied to the preview flow.

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 ('Ban a user from the server') plus the optional message-purge behavior and the edge case of already-departed users identified by ID. That is concrete and unambiguous, but it never names a sibling (e.g. kick_member, unban_member, bulk_ban) to draw the boundary explicitly, leaving the agent to infer that a removal is permanent rather than temporary.

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?

Gives real usage direction: it can be called directly and safely, the first call must be followed by a token-bearing call, and the preview should be relayed to the user before proceeding. It also clarifies the case where the target has already left. What it lacks is an explicit when-to-use-this-vs-alternatives statement naming kick_member or bulk_ban.

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