The spell determines the single most basic function of each magic item, including how to activate that function (if appropriate), and how many charges are left (if any). For example, a +2 vorpal sword, a +2 dancing sword, and a +2 sword would all register as "+2 to attack and damage rolls."
If a magic item has multiple different functions that are equally basic, identify determines the lowest-level function. If these functions are also of equal level, the DM decides randomly which is identified.