There is a one-time only use item replacement policy used by GM (Game Master) that can replace any item in the game that is accidentally discarded or missing from your inventory.

In your case this policy would be used to restore the spent tomes and they would even let you keep the Book of Diamonds you didn't mean to purchase.

Unless you use the above stated policy there is no free item exchange.