Skip to main content
Glama
wowjinxy
by wowjinxy

get_server_info

Retrieve detailed information about a Discord server, including channels, roles, and member data, to manage and analyze server structure.

Instructions

Retrieve detailed information about a Discord server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idNo

Implementation Reference

  • Implements the execution logic for retrieving detailed Discord server information using the discord_client.fetch_guild method and formatting it into a structured text response.
        @staticmethod
        async def handle_server_info(discord_client, arguments: Dict[str, Any]) -> List[TextContent]:
            """Get server information"""
            guild = await discord_client.fetch_guild(int(arguments["server_id"]))
            
            # Get additional info
            owner = await discord_client.fetch_user(guild.owner_id) if guild.owner_id else None
            
            info = f"""
    **Server Information for {guild.name}**
    
    **Basic Info:**
    - ID: {guild.id}
    - Owner: {owner.name if owner else "Unknown"}
    - Member Count: {guild.member_count}
    - Created: {guild.created_at.strftime('%Y-%m-%d %H:%M:%S')}
    
    **Settings:**
    - Verification Level: {guild.verification_level.name}
    - Content Filter: {guild.explicit_content_filter.name}
    - Boost Level: {guild.premium_tier}
    - Boost Count: {guild.premium_subscription_count}
    
    **Channels & Roles:**
    - Channels: {len(guild.channels)}
    - Roles: {len(guild.roles)}
    - Emojis: {len(guild.emojis)}
    
    **Features:** {', '.join(guild.features) if guild.features else 'None'}
            """.strip()
            
            return [TextContent(type="text", text=info)]
  • Defines the input schema, description, and parameters for the get_server_info tool, requiring a server_id string.
    Tool(
        name="get_server_info",
        description="Get detailed information about a Discord server",
        inputSchema={
            "type": "object",
            "properties": {
                "server_id": {
                    "type": "string",
                    "description": "Discord server (guild) ID"
                }
            },
            "required": ["server_id"]
        }
    ),
  • Registers and routes calls to the get_server_info tool by including it in core_tool_names and dispatching to the corresponding handler method in CoreToolHandlers.
    core_tool_names = [
        "get_server_info", "list_servers", "get_channels", "list_members",
        "get_user_info", "send_message", "read_messages", "add_reaction",
        "add_multiple_reactions", "remove_reaction", "moderate_message",
        "create_text_channel", "delete_channel", "add_role", "remove_role"
    ]
    
    if name in core_tool_names:
        handler_method = f"handle_{name}"
        if hasattr(CoreToolHandlers, handler_method):
            return await getattr(CoreToolHandlers, handler_method)(discord_client, arguments)

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