PromptForge
AI Glossary

Prompting techniques

Function calling

Also known as: tool use, tool calling

Definition

Function calling lets a model request that your code run a specific function with specific arguments. You expose tool definitions; the model returns a structured call, your code executes it, and the result goes back into the conversation.

Function calling (also called tool use) is the mechanism behind most AI agents. You describe available functions with names, descriptions and JSON-schema parameters. The model decides when a function is needed and emits a structured request rather than prose.

Critically, the model does not execute anything. It produces a request; your application validates and runs it, then returns the result. That separation is where your security boundary lives — never pass model-generated arguments straight into a shell, a database query, or a payment API without validation.

Good tool descriptions matter as much as good prompts. The model chooses tools based on their descriptions, so vague descriptions cause wrong tool selection.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.