This command causes all the tools not on the shelf to save their settings as optionVars. This is called automatically by the system when Maya exits.
Derived from mel command maya.cmds.saveToolSettings
Example:
import pymel.core as pm
pm.saveToolSettings()