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 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.
Optionaldescription?: stringAn optional description of what the tool does. Will be used by the language model to decide whether to use the tool. Not used for provider-defined tools.
Optionalexecute?: (An async function that is called with the arguments from the tool call and produces a result. If not provided, the tool will not be executed automatically.
Optionaltype?: "function"Function tool.
Provider-defined tool.
The ID of the tool. Should follow the format <provider-name>.<tool-name>.
The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
A tool contains the description and the schema of the input that the tool expects. This enables the language model to generate the input.
The tool can also contain an optional execute function for the actual execution function of the tool.