Tool Use, Function Calling, and Environment Interaction
Tools Extend Agency
What Counts as a Tool
A tool is any external capability the agent can invoke: search, calculator, code execution, file retrieval, database queries, calendars, email actions, or device controls. Tools let the system access information and effects that the model itself does not contain.
Why Function Calling Matters
Function calling provides a structured way for a model to request an action with typed inputs. That structure reduces ambiguity, makes validation easier, and helps separate generation from execution.
Tool Design Principles
Safety Boundary
The agent should not directly execute high-risk actions without confirmation, logging, and validation.
What is a major advantage of structured function calling over free-form tool requests?
Structure reduces ambiguity and supports safer downstream execution.
Correct answer: It makes validation and execution safer and more reliable
Name one example of a useful agent tool.
Other valid answers include search, database query, code execution, or calendar access.
Correct answer: A calculator.
Free Text vs Structured Tool Calls
Free Text
- Flexible and expressive
- Harder to validate automatically
- More prone to ambiguity
Structured Call
- Easier to parse and enforce
- Better for safety checks
- Less ambiguous execution
Which action is most appropriate to gate behind confirmation?
Email can have external consequences and should usually require confirmation.
Correct answer: Sending an email to a customer