Most tool-calling writing covers what the model emits: the arguments, the JSON, the errors. The half that decides whether a call survives contact with production is the request side, the schema you hand the model before it says anything. Treat that schema as a contract with strict types, required fields, format checks and no extraneous fields, and you convert a text generator into a component with a typed interface, as Adaline's guide to tool calling functions puts it.
The failure modes repeat. A model omits a required parameter, returns a string where an integer belongs, invents a value outside the allowed set, or adds a field the function never declared. Without a validation layer each of those reaches application logic, breaking workflows and creating security risk, which is why a walkthrough of JSON Schema validation for tool calls argues the schema should be checked before execution, never after.
The claim worth internalizing: roughly half of tool call errors are the model's fault, and the other half are bugs in the signature you handed it. That is the argument in David Rodenas's account of validation and tool call errors, and it reframes debugging. When a call fails validation, the first question is not how to prompt better but what in this schema let an invalid value look reasonable to the model.
A second reframe matters for anyone operating agents. Not every failure is retryable the same way. Transient transport errors belong to the orchestration layer, while validation failures cannot be fixed by resending the same payload, so the model has to read the error and produce a corrected request, as n8n's guide to LLM tool calling error handling lays out. The quality of your schema therefore decides how much recovery burden lands on the model, and whether it can recover at all.



