All lessons in AI Engineering: From Foundation Models to Evaluated Applications
Tool Calling and Execution Boundaries
Define tool contracts and enforce validation, authorization, and duplicate-action protection.
60 minutes · Members lesson · preview
What you will learn
- Specify tool inputs, outputs, and error states that an application can validate.
- Separate model proposals from authenticated authorization and human approval.
- Design retries and idempotency for actions whose outcomes may be uncertain.
A customer asks the assistant to create a ticket for a broken lamp. The model produces a plausible function name and arguments. If your application executes them immediately, the model has effectively become the authority over whose order is changed and whether the customer approved the action. A tool interface needs a stronger contract.
You have learned to ground answers in authorized evidence. This core knowledge lesson extends the same boundary discipline to actions. T25 will expose tools through MCP, and T15 will place them in bounded agent loops. Required practice P07 builds the tool-using workflow; the exercises here specify the execution rules before implementation.
The course uses synthetic orders and simulated support tickets. Creating a ticket does not issue a refund, send a message, or contact a real support team. That distinction should appear in the application's interface and in your assessment report.