Developers describe each tool with a name, a description and a parameter schema written in JSON Schema, a declarative language for the structure of JSON data. The loop has five steps: send the request with the tool definitions, receive a tool call from the model, run the function in your application, send the output back, and receive either a final answer or further tool calls.
- • Tool schemas describe what each function does and which parameters it accepts.
- • The model decides when, and whether, a tool is needed.
- • Results return to the model as context for its next step.