How do I use tools in the Playground?
Tools (also called function calling) let a model call functions you define — for example, to look up live data mid-conversation. You can try this in the Playground before building it into your app.
- In the settings panel, open Advanced and find Tools.
- Select Add tool and provide the tool's definition as JSON. If you're not sure of the format, use Examples to start from a sample.
- Save the tool, then chat as usual. The model decides when to call your tool based on its definition and your prompt.
In the Playground the model chooses when to call a tool. If you need to force or disable tool use (the tool_choice parameter), that's set when you call the API — see Tool calling in the developer documentation for the full guide and code examples.