You could just use the methods Calibre uses to update the metadata. No need to reinvent the wheel. However, I fail to see why this would be a Good Thing to have. It would only incite people to dig around inside the Calibre library...
I reject your reality and substitute my own.