An engineer is defining a tool for the customs-compliance agent that looks up the current tariff rate for a given HS code and destination country. Which design gives the agent the most reliable ability to call the tool correctly and use its result in later reasoning?
Select an answer to reveal the explanation.
Short Explanation
Give your agent a form to fill out, not a blank sheet of paper. A clear tool name, typed parameters, and a structured response with named fields make it easier to call the tool with the right values and use its result in later reasoning; free text in and prose out can leave the agent guessing at both ends.
Full Explanation
Reliable tool use depends on a well-defined interface: a clear function name and description help the agent know when to call it, typed parameters (an HS code string and a country string) make arguments validated and unambiguous, and a structured return value with named fields such as rate, currency, and effective date lets later reasoning reference specific values instead of parsing prose. This design minimizes both call-time errors and post-call misinterpretation. A single free-text input may seem flexible, but it leaves parameter extraction to the model, which is what a typed schema is meant to avoid, and makes validation and logging harder. A polished paragraph may suit a human reader, but a rate embedded in prose is harder for the agent to compare or recompute with in a later step. No declared parameters means relying on conversation history to infer the HS code and country, which is unreliable and untestable and defeats the purpose of a typed tool contract. Exam caveat: Mosaic AI Agent Framework tools use explicit signatures to keep tool-calling and multi-step reasoning deterministic and debuggable. Practical check: confirm that the agent can pass the two typed inputs and retrieve the rate from a named output field without interpreting free-form text.