# Source: https://docs.ultravox.ai/tools/custom/parameters.md

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ultravox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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:

<Steps>
  <Step title="Dynamic">The model will choose which values to pass. These are the parameters you'd use for a single-generation LLM API.</Step>
  <Step title="Static">This value is known when the tool is defined and is unconditionally set on invocations. The parameter is not exposed to or set by the model.</Step>
  <Step title="Automatic">Like "Static", except that the value may not be known when the tool is defined but will instead be populated by the system when the tool is invoked.</Step>
</Steps>

## Dynamic Parameters

Dynamic parameters will have their values set by the model. Creating a dynamic parameter on a tool looks like this:

```js Adding a dynamic parameter to a tool theme={null}
// Adding a dynamic parameter to a stock price tool
// The parameter will be named 'symbol' and will be passed as a query parameter
{
  "name": "stock_price",
  "description": "Get the current stock price for a given symbol",
  "dynamicParameters": [
    {
      "name": "symbol",
      "location": "PARAMETER_LOCATION_QUERY",
      "schema": {
        "type": "string",
        "description": "Stock symbol (e.g., AAPL for Apple Inc.)"
      },
      "required": true
    }
  ]
}
```

### 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.

```js Overriding a dynamic parameter with a static value theme={null}
// Overriding dynamic parameter when starting a new call
// Always set the stock symbol to 'NVDA'
{
  "systemPrompt": ...
  "selectedTools": [
    "toolName": "stock_price",
    "nameOverride": "nvidia_stock_price",
    "descriptionOverride": "Looks up the current stock price for Nvidia.",
    "parameterOverrides": {
      "symbol": "NVDA"
    }
  ]
}
```

## 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.

```js Adding a static parameter to a tool theme={null}
// Adding a static parameter that always sends utm=ultravox
{
  "name": "stock_price",
  "description": "Get the current stock price for a given symbol",
  "staticParameters": [
    {
      "name": "utm",
      "location": "PARAMETER_LOCATION_QUERY",
      "value": "ultravox"
    }
  ]
}
```

### 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 →](/tools/built-in-tools#querycorpus) 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](/agents/guiding-agents#tool-state).         |

More details can be found in the [Tool Definition Schema →](/api-reference/schema/base-tool-definition#schema-automatic-parameters)

```js Adding an automatic parameter to a tool theme={null}
// Adding automatic parameters to a profile creation tool
// There are two parameters added:
// 'call_id' which is sent as a query param
// 'conversation_history' which is sent in the request body
{
  "name": "create_profile",
  "description": "Creates a profile for the current caller",
  "automaticParameters": [
    {
      "name": "call_id",
      "location": "PARAMETER_LOCATION_QUERY",
      "knownValue": "KNOWN_PARAM_CALL_ID"
    },
    {
      "name": "conversation_history",
      "location": "PARAMETER_LOCATION_BODY",
      "knownValue": "KNOWN_PARAM_CONVERSATION_HISTORY"
    }
  ]
}
```

## 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 →](/tools/custom/parameter-overrides)