Skip to main content
Glama
wowjinxy
by wowjinxy

unban_member

Remove a user ban in Discord servers. Specify the user ID to lift the ban, with optional server ID and reason parameters for moderation management.

Instructions

Remove a ban for a user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes
server_idNo
reasonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'unban_member' tool. It fetches the guild and user, then calls guild.unban(user, reason=reason) to remove the ban, and returns a confirmation message.
    async def unban_member(
        user_id: str | int,
        server_id: str | int | None = None,
        reason: str | None = None,
        ctx: Context = None,
    ) -> str:  # type: ignore[override]
        """Remove a ban for a user."""
    
        assert ctx is not None
        bot, config = await _acquire(ctx)
        guild_id = _resolve_guild_id(config, server_id)
        guild = await _ensure_guild(bot, guild_id)
    
        user = await _call_discord("fetch user", bot.fetch_user(_require_int(user_id, "user_id")))
        await _call_discord("unban member", guild.unban(user, reason=reason))
        return f"Unbanned {user.display_name} ({user.id}) from {guild.name}."
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. It states the action ('Remove a ban') which implies a mutation, but doesn't mention required permissions, whether the action is reversible, potential side effects (e.g., user regaining access), or error conditions. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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, clear sentence with zero wasted words. It's front-loaded with the core action and doesn't include any unnecessary elaboration. Every word earns its place in conveying the essential purpose.

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

Completeness3/5

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

Given the tool has an output schema (which handles return values), no annotations, and moderate complexity (mutation with 3 parameters), the description is minimally adequate. It states what the tool does but lacks context about permissions, error handling, and parameter meanings. For a ban reversal tool, more behavioral context would be helpful despite the output schema.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'a user' which aligns with 'user_id', but doesn't explain the optional 'server_id' (context) or 'reason' (audit log) parameters. With 3 parameters total and only one implicitly covered, the description adds minimal semantic value beyond what's obvious from parameter names.

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 'Remove a ban for a user' clearly states the action (remove) and target (ban for a user), making the purpose immediately understandable. It distinguishes from siblings like 'ban_member' and 'kick_member' by specifying the reversal of a ban. However, it doesn't explicitly mention the resource context (e.g., server/moderator action), which keeps it from a perfect score.

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. It doesn't mention prerequisites (e.g., user must be banned first), nor does it differentiate from similar tools like 'kick_member' or 'timeout_member' in terms of use cases. The agent must infer usage from the name and context 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/wowjinxy/mcp-discord'

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