A tool is a callable function or API that an application or language model can invoke with structured parameters to perform a real-world action or retrieve information. In an agent, the model can answer directly or request a tool call; the application executes the tool and returns its result for further processing. section 10.1.3 section 10.6.3
Useful tools have clear inputs, outputs, and documentation:
- Define a focused function, using type hints and docstrings to describe parameters, formats, and return values. section 10.6.3
Checking an order
A support agent can retrieve a user's ID from an email address and birth date, find an order ID from the user ID and order date, then retrieve the order status. For Alice Johnson, the sequence returns order 101, its shipped status, tracking number TRK123456789, and expected delivery date February 18, 2025. section 10.6.4













