Tool Calling
Understand how a model's proposed action becomes a software operation. · AI Product Management · Lesson 46 · 3 min
Tool Calling · 3 min
Situation
“I refunded the order” is not enough.
A shopping assistant tells a user that a refund is complete. Unless an authorized payment operation actually ran and returned confirmation, the sentence does not establish that money moved.
Tool calling connects generation to real data or actions. The application must remain responsible for what gets executed.
Process
Propose → validate → execute → return → continue.
The model receives descriptions of available tools. It may request a tool with arguments. Software checks the request and runs the operation. The result returns to the model, which can continue or respond.
The model's tool request is distinct from execution success. An operation can be denied, fail, time out, or return an ambiguous result.
Example
Separate lookup from refund.
A lookup tool can retrieve the order and payment status within the user's access. A refund tool performs a consequential change and should have tighter authorization and confirmation rules.
The interface might first show the order, refund amount, and destination for review. The backend validates eligibility and prevents duplicate execution, regardless of what the model proposes.
Failure case
Valid arguments point to the wrong target.
A tool request can conform to its schema while naming the wrong order. The model may confuse two purchases, or untrusted retrieved text may try to redirect the action.
Check identity, resource ownership, allowed scope, and the user's actual intent. Do not let model-generated IDs or natural-language assurances bypass those checks.
PM decision
Design the action boundary.
Specify which tools are read-only, which require approval, which can be reversed, and how results are shown. Define behavior for partial success and safe retries.
For refunds, a timeout should trigger status checking before another attempt. The product should report what is confirmed, rather than converting uncertainty into a confident success message.
Remember this
A tool call is a request, not permission or proof.
The software enforces authority and records outcomes. The model helps select and explain actions within that controlled boundary.