# What is function calling?

Function calling lets a model respond with a structured request to invoke a function you defined, arguments included, instead of prose. Your code executes the call and returns the result; the model continues with real data. It is the wire-level mechanism underneath tool use and agents.

You describe each function with a name, a purpose, and a JSON schema for its arguments. The model decides when a call is needed and emits arguments matching the schema; malformed or hallucinated arguments are the failure mode that separates models on this task.

On an OpenAI-compatible wire, tool definitions ride the request and tool calls ride the response, so function calling works identically across every language model behind the gateway.

## Related terms

- [AI agents](https://allocate.network/glossary/ai-agents.md)
- [Tool use](https://allocate.network/glossary/tool-use.md)
- [Structured outputs](https://allocate.network/glossary/structured-outputs.md)

---

[HTML page](https://allocate.network/glossary/function-calling) · [Machine-readable catalog](https://allocate.network/catalog.json)
