Chapter 4: Tools, MCP, and Confirmation Flows
April 13, 2026 ยท View on GitHub
Welcome to Chapter 4: Tools, MCP, and Confirmation Flows. In this part of ADK Python Tutorial: Production-Grade Agent Engineering with Google's ADK, you will build an intuitive mental model first, then move into concrete implementation details and practical production tradeoffs.
This chapter explains how to safely expose external capabilities to ADK agents.
Learning Goals
- use Python tools and OpenAPI/MCP integrations
- gate risky tool actions with confirmation flows
- build safer human-in-the-loop controls
- reduce runtime surprises from tool misuse
Tooling Categories in ADK
- Python function tools
- OpenAPI-based tools
- MCP-based tools
- Google ecosystem connectors
Confirmation Strategy
For tools with side effects, add explicit confirmation requirements before execution. This keeps the agent useful while reducing accidental writes or external operations.
Source References
Summary
You now have a practical pattern for shipping tool-enabled ADK agents with stronger safety defaults.
Next: Chapter 5: Sessions, Memory, and Context Management
Source Code Walkthrough
contributing/samples/adk_pr_triaging_agent/agent.py
The contributing/samples/adk_pr_triaging_agent/agent.py demonstrates tool registration in a real ADK agent. Functions like add_label_to_pr are decorated and passed as tools to the agent, showing exactly how Python functions become callable tools. This is a concrete, working example of the tool integration patterns covered in Chapter 4.