You can do anything calibre itself can do from a plugin, there is no API that is not accessible. For instance if you want to trigger the merge action from your plugin, you can do:
Code:
self.gui.iactions['Edit metadata'].merge_books()
see the code of the merge_books() function in edit_metadata.py in the calibre source code for parameters to pass or if you want to manually do some things that function does.