Tool Use and Function Calling
Understand how AI tools call search, code, calendars, and APIs—and how to prompt for reliable tool use.
Tools extend what models can do
Large models can request tools: web search, calculator, code runner, database query, or calendar lookup. The model proposes a tool call; your app runs it and returns the result.
Prompt for tool discipline
Tell the agent when to search vs when to reason, what tools are allowed, and what to do if a tool fails. Good prompts say 'use search only for time-sensitive facts.'
Validate tool output
Tools can fail, time out, or return partial data. Advanced users log tool calls, cap retries, and require the model to cite which tool produced each fact.
Example
Search vs memory
What is the latest price of our competitor plan?
web search for current pricing only. If search fails, say you could not verify and list what you would check manually. Do not guess prices.
Takeaway The tool-aware prompt names the tool, failure behavior, and anti-hallucination rule.
Mini challenge
Tool policy
Sample answer: Use search for dates and names; use notes tool for my saved summaries; never invent headlines; retry search once then stop.
Open this mission in the Kiwippy app to mark it complete and track progress.
