The classes you need to work with when writing syntax objects are MSyntax and MArgDatabase. These classes are required for defining and handling command flag input.
MSyntax—Used to specify flags and arguments passed to commands.
MArgDatabase—Class used to parse and store all flags, arguments, and objects passed to a command. The MArgDatabase accepts an MSyntax object, which describes the format for a command, and uses it to parse the command arguments into a form which is easy to query.