Skip to main content
Glama
wowjinxy
by wowjinxy

list_members

Retrieve and display members from a Discord server with options to filter bots and set result limits.

Instructions

List members of a Discord server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idNo
limitNo
include_botsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function that fetches and formats the list of server members, including roles, join dates, bot/human classification, with configurable limit.
        @staticmethod
        async def handle_list_members(discord_client, arguments: Dict[str, Any]) -> List[TextContent]:
            """List server members"""
            guild = await discord_client.fetch_guild(int(arguments["server_id"]))
            limit = min(int(arguments.get("limit", 50)), 1000)
            
            members_info = []
            count = 0
            
            async for member in guild.fetch_members(limit=limit):
                if count >= limit:
                    break
                    
                roles = [role.name for role in member.roles if role.name != "@everyone"]
                
                members_info.append({
                    "name": member.display_name,
                    "username": str(member),
                    "id": member.id,
                    "joined": member.joined_at.strftime('%Y-%m-%d') if member.joined_at else "Unknown",
                    "roles": roles,
                    "is_bot": member.bot
                })
                count += 1
            
            # Format the member list
            member_list = []
            humans = 0
            bots = 0
            
            for member in members_info:
                if member["is_bot"]:
                    bots += 1
                    member_type = "🤖"
                else:
                    humans += 1
                    member_type = "👤"
                
                roles_str = ", ".join(member["roles"][:3])  # Limit to first 3 roles
                if len(member["roles"]) > 3:
                    roles_str += f" (+{len(member['roles'])-3} more)"
                
                member_list.append(
                    f"{member_type} **{member['name']}** ({member['username']})\n"
                    f"   Joined: {member['joined']} | Roles: {roles_str or 'None'}"
                )
            
            result = f"""**Members in {guild.name}** (Showing {len(members_info)} of {guild.member_count})
    
    **Summary:** {humans} humans, {bots} bots
    
    {chr(10).join(member_list)}"""
            
            return [TextContent(type="text", text=result)]
  • Registers the 'list_members' tool with its input schema (server_id required, optional limit) in the MCP server's list_tools() function.
    Tool(
        name="list_members",
        description="Get a list of members in a server with roles and activity",
        inputSchema={
            "type": "object",
            "properties": {
                "server_id": {
                    "type": "string",
                    "description": "Discord server (guild) ID"
                },
                "limit": {
                    "type": "number",
                    "description": "Maximum number of members to fetch",
                    "minimum": 1,
                    "maximum": 1000
                }
            },
            "required": ["server_id"]
        }
    ),
  • Input schema definition for the list_members tool, specifying server_id as required and limit as optional with bounds.
        inputSchema={
            "type": "object",
            "properties": {
                "server_id": {
                    "type": "string",
                    "description": "Discord server (guild) ID"
                },
                "limit": {
                    "type": "number",
                    "description": "Maximum number of members to fetch",
                    "minimum": 1,
                    "maximum": 1000
                }
            },
            "required": ["server_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. It states the basic function but doesn't mention pagination behavior, rate limits, authentication requirements, error conditions, or what happens when server_id is null. For a read operation with 3 parameters, this leaves significant behavioral gaps.

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 that states the core function without unnecessary words. It's appropriately sized for a basic list operation and front-loads the essential information.

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's moderate complexity (3 parameters, no annotations, but has output schema), the description is minimally adequate but incomplete. The output schema existence means return values are documented elsewhere, but the description should still address parameter meanings and usage context given the lack of schema descriptions.

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?

With 0% schema description coverage and 3 parameters, the description provides no information about any parameters. It doesn't explain what server_id represents, what limit controls, or what include_bots does. The description fails to compensate for the complete lack of schema documentation.

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 ('List') and resource ('members of a Discord server'), making the purpose immediately understandable. It doesn't differentiate from siblings like 'list_servers' or 'list_roles', but the verb+resource combination is specific enough for basic understanding.

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 'get_user_info' or 'list_servers'. There's no mention of prerequisites, limitations, or comparison with sibling tools, 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/wowjinxy/mcp-discord'

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