Every battery powered tool is a different mystery ? Do you have some rules to discern how it works ?
Choosing a simplest example : 3 contacts on the tool :

Obviously, we have pos, neg and here a mystery third... That third terminal can tell the battery that the tool is overheated; or the battery tell the tool it is overheated, or it is a 20V, or a 24V, or whatever so the tool won't work with it. The signal can be as a 'low' or a 'high' or an analog value. Never seen an explanation on any tool/battery manual.
And that is only for 3 terminals, in one brand. There is dozens of brands, dozens of models, with 4, 5, 6, 7, 8... terminals. Never seen their function explained. Some identify the pack for the charger to accept charging. While charging, direction is another: The charger interrogating the pack for its health to refuse charging or not. A multitude of unknowns
Choosing a simplest example : 3 contacts on the tool :

Obviously, we have pos, neg and here a mystery third... That third terminal can tell the battery that the tool is overheated; or the battery tell the tool it is overheated, or it is a 20V, or a 24V, or whatever so the tool won't work with it. The signal can be as a 'low' or a 'high' or an analog value. Never seen an explanation on any tool/battery manual.
And that is only for 3 terminals, in one brand. There is dozens of brands, dozens of models, with 4, 5, 6, 7, 8... terminals. Never seen their function explained. Some identify the pack for the charger to accept charging. While charging, direction is another: The charger interrogating the pack for its health to refuse charging or not. A multitude of unknowns