An LLM generates text. With function calling, it generates actions. The model calls a calendar API with parameters. No parsing — structured output directly from the model.
How It Works¶
You define tools as JSON schemas. The model returns a structured function call with arguments. The application executes it and returns the result to the model.
Design Principles¶
- Clear descriptions: The model decides based on the description
- Atomic functions: One tool = one action
- Input validation: Never trust parameters without validation
- Idempotence: A double call must not cause problems
Security¶
Prompt injection can trigger unauthorized API calls. Add a confirmation step for destructive actions, an allow-list, and rate limiting.
Production¶
A tool-use agent for helpdesk: 8 tools. After 3 months: 60% of tickets resolved without human intervention.
Function Calling Is the Bridge Between AI and Action¶
Invest in tool design the same way you invest in API design — it’s equally important.
Need help with implementation?
Our experts can help with design, implementation, and operations. From architecture to production.
Contact us