The wiki is your friend. Use the links to the mobipocket site for documentation on this. You cannot build one directly as it is compiled but you can build a source file and compile it using the mobi compiler called
MobiPocket Creator. However, the recommended way is to use ePub and then KindleGen. If you look at the documentation you will notice that pre-KF8 formats from Kindle do not support all the features of ePub so this may be what youi saw in your conversion. You do have to limit the source to what mobi can understand.
Dale