get_user_info
Fetch Discord user details by providing a user ID to retrieve profile information and account data.
Instructions
Fetch information about a specific Discord user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes |
Implementation Reference
- The handler function that executes the get_user_info tool, fetching Discord user data and formatting a detailed info response.@staticmethod async def handle_get_user_info(discord_client, arguments: Dict[str, Any]) -> List[TextContent]: """Get user information""" user = await discord_client.fetch_user(int(arguments["user_id"])) info = f""" **User Information for {user.display_name}** **Basic Info:** - Username: {user.name} - Display Name: {user.display_name} - ID: {user.id} - Bot: {"Yes" if user.bot else "No"} - Account Created: {user.created_at.strftime('%Y-%m-%d %H:%M:%S')} **Avatar:** {user.display_avatar.url if user.display_avatar else "No avatar"} """.strip() return [TextContent(type="text", text=info)]
- src/discord_mcp/integrated_server.py:884-897 (registration)Registers the get_user_info tool in the MCP server's tool list with description and input schema requiring 'user_id'.Tool( name="get_user_info", description="Get detailed information about a Discord user", inputSchema={ "type": "object", "properties": { "user_id": { "type": "string", "description": "Discord user ID" } }, "required": ["user_id"] } ),
- src/discord_mcp/integrated_server.py:1022-1026 (registration)Lists 'get_user_info' among core tools to route execution to the corresponding CoreToolHandlers method."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" ]