A transit agency's trip-planning agent, built with ADK, defines a typed schema for a fare-lookup function along with a callback that validates the tool's output before it's returned to the rider. What does this design correctly reflect about ADK tool integration?
Select an answer to reveal the explanation.
Short Explanation
Think of it like a vending machine with clearly labeled buttons and a coin checker, instead of a slot where you just shout what you want and hope it understood. A typed schema tells the fare-lookup tool exactly what input to expect and what shape its output takes, and the callback double-checks that output before it ever reaches the rider. That structure is what keeps a wrong fare from quietly slipping through.
Full Explanation
ADK tool integration is built around structured schemas that define a tool's expected inputs and outputs, paired with callbacks that can inspect and validate a tool's result before the agent acts on it or returns it downstream. A fare-lookup tool with a typed schema and an output-validating callback reflects both halves of this pattern working together: structure going in, verification coming out.
Defining tools as free-text instructions for the model to interpret abandons the structure ADK is built to provide, reintroducing the ambiguity a typed schema exists to remove, and makes malformed output far more likely to slip through undetected. Treating callbacks as purely a logging mechanism understates their role — a validation callback can actively reject or correct a bad tool result before it reaches the rider, not just record that the call happened. Assuming a schema becomes optional once the model is capable enough ties correctness to the model's judgment on every single call, rather than to a structural guarantee that holds regardless of the model's behavior.
Scope note: a validation callback only catches what it's written to check, so its coverage should be reviewed against the range of fare-lookup failure modes the transit agency actually cares about. Operational check: intentionally return a malformed fare value from the tool in a test environment and confirm the callback blocks it before it reaches the rider-facing response.