Module Check: Tools, Done Right
You have covered the complete arc of tool use and function calling: how agents call tools, how schemas define them, how structured outputs constrain responses, how the round trip works, what makes tools reliable, how errors are handled, how security is built in, and what a real multi-tool system looks like in practice. This lesson reviews all of it — sharpen the vocabulary, test the concepts, and synthesize the principles into a unified mental model.
Flashcards — click each card to reveal the answer
Module Check Quizzes
An AI agent receives a user question it can answer entirely from training knowledge. It has several tools available. What should happen?
A developer writes a tool description: 'Looks up information.' Later, the agent frequently calls this tool when a more specific get_customer_by_id tool would have been correct. What is the root cause?
An agent calls a database tool that raises an unhandled exception. The executor catches the exception, logs it, and returns null to the model. The model then generates a response as if the tool succeeded, fabricating plausible data. What went wrong?
An agent is tasked with booking a flight and paying for it. The flight booking step succeeds. The payment step times out — the executor does not know if payment was charged or not. The agent retries the payment tool. What property of the payment tool determines whether this is safe?
A security audit finds that an agent processing customer support emails has both a read_emails tool and a delete_account tool in its active tool list. The agent's actual job is only to read emails and draft replies. What is the correct remediation?
Design a Complete Agent System — From Scratch
- This capstone activity asks you to synthesize everything from the module into a coherent agent design.
- Scenario: You are the technical lead for an AI-powered homework help agent at a high school. The agent can access a school library database, a calculator API, a web search service, and a note-saving system. Students use it to get help with math, science, and research assignments.
- Part 1 — Tool Design (apply Lesson 2 and Lesson 5):
- Design 4 tools for this agent. For each, write: name, full description (including when not to use it), all parameters with types and descriptions, the required array, and a classification of reversible vs. irreversible.
- Part 2 — Round Trip Trace (apply Lesson 4):
- A student asks: 'Can you find me two sources on the water cycle and solve this equation: 4x + 12 = 36?' Trace the complete execution sequence. Show which tool calls can be parallelized and which must be sequential. Show how many sequential rounds this requires.
- Part 3 — Error Handling (apply Lesson 6):
- The library database is temporarily unavailable. Describe how the agent degrades gracefully: what error does the executor return? How does the model reason about it? What does the student receive?
- Part 4 — Security Review (apply Lesson 7):
- Identify two realistic security risks for this agent given that it serves minors and processes student-supplied content. For each risk, state the threat, the attack vector, and your mitigation.
- Part 5 — Reflection:
- If you had to identify the single most important principle from this entire module — the one that, if violated, breaks everything else — what would it be and why?
- Goal: demonstrate integrated understanding of tool use end to end.