An async function that is called with the arguments from the tool call and produces a result. It also carries context about current session, user-defined data, and the tool call id, etc.
The schema of the input that the tool expects. The language model will use this to generate the input. It is also used to validate the output of the language model. Use descriptions to make the input understandable for the language model.
The description of the tool. Will be used by the language model to decide whether to use the tool.