Skip to main content
Glama

discord_ban_member

Ban users from Discord servers to enforce community rules and maintain moderation. Specify guild and user IDs, optional reason, and message deletion period.

Instructions

Ban a member from a guild.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
user_idYes
reasonNo
delete_message_daysNoDelete messages from last N days (0–7).

Implementation Reference

  • The handler logic for "discord_ban_member" which fetches the guild, validates the input, and calls discord.js to perform the ban.
    case "discord_ban_member": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      const deleteDays = Math.min(Math.max(Number(args.delete_message_days ?? 0), 0), 7);
      await guild.members.ban(args.user_id as string, {
        reason: args.reason as string | undefined,
        deleteMessageSeconds: deleteDays * 86400,
      });
      return { content: [{ type: "text", text: `✅ User ${args.user_id} has been banned.` }] };
    }
  • The schema definition for the "discord_ban_member" tool.
      name: "discord_ban_member",
      description: "Ban a member from a guild.",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          user_id: { type: "string" },
          reason: { type: "string" },
          delete_message_days: { type: "number", description: "Delete messages from last N days (0–7)." },
        },
        required: ["guild_id", "user_id"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Ban' implies a destructive, permanent action, it doesn't specify permission requirements, whether bans are reversible (though 'discord_unban_member' exists as sibling), rate limits, or what happens to the user's messages. The description lacks crucial context for a high-impact moderation tool.

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 a single, efficient sentence with zero wasted words. It's appropriately sized for a straightforward action and front-loads the core purpose immediately.

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

Completeness2/5

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

For a destructive moderation tool with 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what a ban entails, permission requirements, consequences, or response format. Given the complexity and lack of structured metadata, the description should provide much more context to be complete.

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 only 25% (only 'delete_message_days' has a description), so the description should compensate but doesn't mention any parameters. However, parameter names ('guild_id', 'user_id', 'reason', 'delete_message_days') are reasonably self-explanatory for Discord API users, providing some implicit semantics. The description adds no parameter information beyond what the bare schema provides.

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 clearly states the action ('Ban') and target ('a member from a guild'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'discord_kick_member' or 'discord_timeout_member' which are also member moderation actions, so it doesn't fully distinguish from alternatives.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like kicking or timing out members. It mentions no prerequisites (e.g., required permissions) or exclusions, leaving the agent to infer usage context from the tool name alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaSympa/discord-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server