Tool Parameters
Learn about dynamic, static, and automatic tool parameters.
Tool parameters define what gets passed to your backend function when the tool is called. When creating a tool, parameters are defined as one of three types:
Dynamic
Static
Automatic
Dynamic Parameters
Dynamic parameters will have their values set by the model. Creating a dynamic parameter on a tool looks like this:
Parameter Overrides
You can choose to set static values for dynamic parameters when you create an agent or start a call. The model won’t see any parameters that you override. When creating a call simply pass in the overrides with each tool, as below. You should also consider overriding the tool name or description to give the model a more specific understanding of what the tool will do in this case.
Static Parameters
If you have parameters that are known at the time you create the tool, static parameters can be used. Static parameters are not exposed to or set by the LLM.
Parameter Overrides
Static parameters can also be overridden when you create an agent or start a call. This is most useful with built-in tools.
For example, the built-in queryCorpus
tool allows you to statically override max_results
.
See queryCorpus Tool → for more.
Automatic Parameters
Automatic parameters are used when you want a consistent, predictable value (not generated by the model) but you don’t know the value when the tool is created.
Here are some of the most common automatic parameters:
knownValue | Description |
---|---|
KNOWN_PARAM_CALL_ID | Used for sending the current Ultravox call ID to the tool. |
KNOWN_PARAM_CONVERSATION_HISTORY | Includes the full conversation history leading up to this tool call. Typically should be in the body of a request. |
KNOWN_PARAM_CALL_STATE | Includes arbitrary state previously set by tools. See Guiding Agents. |
More details can be found in the Tool Definition Schema →
Required Parameter Overrides
Sometimes your tool will require a parameter to function that you need to have defined when the call is created instead of having the model come up with a value. In these cases, you can require that the parameter be overridden at call creation. For example, the built-in queryCorpus
tool requires the corpus id to be specified during call creation.
More advanced information can be found in Parameter Overrides →