Tool Calling
also: function calling
How a model reaches beyond text: it emits a structured call and your code runs the function.
Tool calling (function calling) gives a model a set of typed function schemas; it decides when to call one and emits structured arguments, and the harness — not the model — executes it and returns the result. The schema quality is the top factor in reliable tool use.
Worked example: give the model a get_weather(city: string) schema and it emits {"name": "get_weather", "arguments": {"city": "Paris"}}; your code runs the real function and feeds the result back for the next step. Gotcha: the model can hallucinate a tool that does not exist or emit arguments that violate the schema, so the harness must validate every call against the schema before executing — never trust the emitted arguments blind.