Tool use
Lesson 15 of 20 · AI.Micro
Models can ask your code to run functions (check stock, place an order) and use the results in their answer.
check_stock(item: string) → number of portions left today
place_order(item: string, qty: integer, pickup: "HH:MM") → order id
Check yourself
Do you still have carrot cake today?
Each tool has a name, a description and the parameters it takes. The model reads these descriptions to decide when a tool would help.
Check yourself
Who actually runs a tool function?
Do it in the browser: a real generative AI tool, a short mission and instant feedback. No install.
Start this lesson — free