An agent that calls a tool and gets an error usually does the same thing next: it re-sends the same request. The prompt is unchanged, the arguments are unchanged, and the only variable is sampling. The odds that a model fixes a structural mistake without being told what the mistake was are the odds that it makes a different error, and you pay full price for that coin flip.
The fix is cheap to add. When a tool call fails validation, put the failing call and its error back into the next turn and ask the model to correct that specific thing. As one practitioner write-up on feeding errors back into the retry puts it, the follow-up works because the model is editing its own output rather than regenerating from scratch, which keeps the parts that were already right and usually fixes the one field that was wrong the dev.to retry write-up.
The same source names the tradeoffs you have to engineer around: an extra call on a bad response, a longer follow-up prompt carrying the error plus the prior payload, and the fact that truly empty or truncated output has nothing to correct. That last point is the reason this article separates failure classes before it does anything else.
There is a wider reason to care about structure at all. A study of structured output control in software engineering tasks notes that an output which is semantically correct but structurally wrong is, from the consuming system's perspective, indistinguishable from a wrong answer the structured output study. That framing is useful for your retry loop: you are not fixing a model that thinks badly, you are repairing the interface between model and tool.



