If you're writing a patent application does the patent need to be specific enough to avoid ambiguity, but not so specific that it locks you into a pinhole sized area (example: define a type of device, or software specs)?
A patent requires detailed public exposure of the invention: that's what you give the state in return for your monopoly rights. In general, that means that there must be sufficiently detailed that someone with the required basic knowledge could build it (which depends on what is being patented: a new type of bicycle requires different basic knowledge than, say, a nuclear reactor).
Your claims define what is yours. If a claim that is too broad, something someone has already done falls under it and yours is not novel and non-obvious. If it is too narrow, it is easy to get around by making a small change. If is is unclear it is indefinite. By understanding what has already been done and what makes your contribution valuable, the person who writes your application and claims, structures claims that go from broad to narrow, preferably down multiple paths of narrowing. The US allows multiple independent claims so the top level claims can address defining your inventions from multiple angles. The specification must disclose how to make and use the claimed device over the breadth of the claims.