The difference between a summary and a main idea is length. They both provide only the important details from the text, but the main idea sums up the text in a single sentence. Therefore, a main idea is defined as a single-sentence summary.
The main idea is what the book is mostly about. The theme is the message, lesson, or moral of a book. Summary is a brief statement or account of the main points of something.