Tools
Tools & Function Calling
Enable AI models to call functions, search the web, and execute code in a sandboxed environment.
Function Calling
Define tools using the standard OpenAI function calling format. The AI decides when to call each function based on context.
JSON
{
"model": "gpt-5.5",
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
}
}
}]
}Web Search
Enable models to search the web for real-time, up-to-date information.
JSON
{
"tools": [{
"type": "web_search",
"web_search": {"enabled": true}
}]
}Bash Execution
Run shell commands in a sandboxed Linux environment (Claude models).
JSON
{
"tools": [{
"type": "bash",
"bash": {"enabled": true}
}]
}⚠️ Model Availability
Tool types vary by model. Check Models & Pricing for per-model capability details.