Techniques

Function Calling / Tool Use

Structured way for an LLM to invoke external functions or APIs with typed arguments.

Function calling lets an LLM decide to invoke a named function with structured arguments — typically defined via JSON schema. The model outputs a tool call; your code executes it; the result is fed back into the conversation.

This is the foundation of agentic AI. Every major model now supports function/tool calling: OpenAI, Anthropic Claude, Google Gemini, and open-source models like Llama 3.1+ and Mistral.

Best practice: keep tool schemas tight and typed, validate arguments before execution, allowlist which tools an agent can call, and log every tool invocation for audit.

Key points

  • Model outputs structured tool calls; your code executes them
  • JSON schema defines expected arguments
  • Every frontier model supports it; open-source is catching up
  • Tight schemas + allowlists + audit are non-negotiable in production

Common use cases

Agentic AI systems
Wiring LLMs into CRMs, ERPs and databases
Structured data extraction with validation
Multi-step workflows with tool orchestration

Frequently asked

Related terms

Applying Function Calling / Tool Use in your business?

We help enterprises design, ship, and govern AI systems end-to-end.