Home › Key concepts › Tool calling

Key concept · Crawl (beginner) · the same on every platform

Tool calling

The model asks your code to do something; your code decides whether it runs.

What it is

You describe tools (functions) to the model: their names, purposes and inputs. The model replies with a request to call one. Your code checks the request, runs the tool, and gives the result back to the model.

Contextinstructions,history, dataModelanswer orask for a toolCheckis this callallowed?Tool runsyour codeAnswerchecked, then senttool?the result goes back into the context; repeat until done or a budget runs outdone
The agent loop. The check between the model's request and the tool is where safety lives.

Why it matters

This is how a model reaches real data and takes real actions. The check in the middle is where safety lives.

An example

The model asks to call get_order(123). Code checks that order 123 belongs to this customer before running it.

The common mistake

Running whatever tool the model asks for, with whatever arguments.

Where you meet it on each platform

The idea stays the same; only the product name changes.

JobAWSAzureGoogle CloudDatabricksOpen source
Tool callinglet the model ask your code to do things, and check before it runsBedrock tool useFoundry function callingGemini function callingUnity Catalog functions as toolsplain Python loop, no framework

Related ideas

Where it shows up

Part of the Crawl level on these paths: AI Engineering (tools and agents).