Tool schemas are the instructions that tell a model which tools it can use and what input each tool needs. In a real application, they sit between natural language and code that touches databases, APIs, queues, files, and other systems.
A good schema makes the model's job much easier. It helps the model choose the right tool, fill in the right arguments, avoid unsupported values, and ask a follow-up question when the user has not provided enough information.
A weak schema leaves too much to guesswork. Generic names, overly broad tools, missing enums, and vague descriptions often lead to wrong tool calls, made-up parameters, unnecessary follow-ups, or actions that your application should never have allowed.
In this chapter, you will learn how to design tool schemas like production APIs: small capability boundaries, clear descriptions, explicit constraints, predictable errors, and tests for the requests most likely to confuse the model.