Tools let GPT models interact with external systems. You define tools using JSON Schema, and the model outputs structured calls when it determines a tool would help answer the user's query.
Chat Completions Format (Nested function key)
The key difference: Responses API puts name at the top level, while Chat Completions nests everything under a function key. Both support the same JSON Schema for parameters.
What the model actually sees
The model sees: name, description, and the parameters JSON Schema (including each property's description and enum values). It does not see your handler implementation. That means the schema is the entire contract — if a behavior isn't expressible in the schema, prompt the model to respect it via the description.
For Responses, the wrapper is flat: {type, name, description, parameters, strict}. For Chat Completions, the wrapper nests: {type, function: {name, description, parameters, strict}}. The body of parameters is identical between them — only the surrounding shape differs.