# Function Calling

> A tool-use pattern where the model emits structured arguments for an application-defined function.

- Category: Tools & Protocols
- Stage: Established
- Also called: JSON tool call, Structured tool call
- Canonical: https://www.joelcsaji.com/ai-dictionary/function-calling

## Plain English

The model fills out a form your code can execute.

## Example

The assistant returns `{ city: "Toronto" }` for a weather lookup tool.

## Why it matters

Function calling is the bridge between natural language and reliable application code.

## Related

- [Structured Outputs](https://www.joelcsaji.com/ai-dictionary/structured-outputs)
- [Tool Use](https://www.joelcsaji.com/ai-dictionary/tool-use)
- [Constrained Decoding](https://www.joelcsaji.com/ai-dictionary/constrained-decoding)

## Sources

- [OpenAI: Function Calling](https://developers.openai.com/api/docs/guides/function-calling)
- [OpenAI: Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
