Many people confuse the synopsis for an agent with the blurb on the back of a book cover. Both have been referred to as a synopsis but for agents it refers to the brief overview of the story in its entirety. When you are sending a query letter and the agent doesn't want any part of the manuscript they still want to know what happens in the book. This involves the ending and for many writers that can be difficult.
When you pour your heart and soul into the story and send off a masterful letter showing how well you can captivate the agent it can seem counterproductive to give away how the story ends but the agent or publisher most times will want to know what happens, characters that change along the way and how it all wraps up including major twists in the plot before they invest time reading the entire book.
Even before you send off your letters a synopsis is a good tool you can use to evaluate the story and its strength. It can be difficult to objectively look at flaws or plot holes in your own work so having a friend or online critique partner could help you. After you write out the synopsis you, or whoever is looking over the document may notice that there are some questions that need answering or there may seem to be nothing to help set your story apart from the monotonous and endless string of pitches that agents receive everyday.
In order to jump to the top of the list your story must be intriguing, original and have something special that will grab the attention of agents, publishers and eventually readers. There is a tremendous amount of competition for this attention so you have to not only hook them but keep them for the long haul. Again the synopsis will demonstrate how your story will do just that.
Most often the synopsis is written with the focus on your main characters, who they are, what their motivations are and the central conflicts that arise throughout the storyline. You don't want to write a short story explaining what happens in your novel but you want to include enough information as well. It is a fine balance and takes practice to get it right. Basically if there is something or someone that directly contributes to the main conflict or the ending would be different without then it or they should be included.
Keep it basic and don't go into too much detail. It will just add length and will distract from the story you are sharing. You can keep the details for your book and once they synopsis gets their attention they can learn more about the setting, the personality of your characters and the meaning behind your story theme as they read the full manuscript. It will take a few drafts before you get used to writing a synopsis but it is a good idea to practice and haven ready for those agents or publishers that prefer to read one first.