TOOLS-305: refactor insertDocuments to use response struct