Lesson 7 of 9 · 6 min read
Malformed Tool Calls: What the Harness Repairs, Rejects and Rescues
A malformed tool call is a request the dispatcher cannot run as written. They come in a short catalogue: JSON wrapped in a code fence or followed by commentary, a value of the wrong type that parses exactly, a missing or extra argument, an unknown tool name, and a call written in the text instead of the tool-call field. The harness handles each in one of three ways. It repairs only what cannot change the model's intent (strip a fence, convert "8611" to 8611 when the schema says integer). It rejects everything else with an error that names the field, the rule and the exact value to send instead, capped at one or two attempts. And it rescues a call the model wrote as text by returning an observation that tells it to use the tool-call field, never by parsing the prose into a call. The split is measured: how often each case occurs per model, and how often the model recovers on the next turn.
All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.
6 months · One payment · No auto-renewal