
Function calling lets the model decide when to call your functions and with what arguments — the foundation of AI agents.
tools parametertool_calls object when it wants to call a functiontools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"}
},
"required": ["city"]
}
}
}]Reference:
TaskLoco™ — The Sticky Note GOAT