neerajjoshi_
05/14/2026, 4:03 PMAI Evy
05/14/2026, 4:03 PMAI Evy
05/14/2026, 4:03 PMjson
{
"type": "object",
"required": [
"order_id"
],
"properties": {
"name": {
"type": "object",
"description": "",
"properties": {
"first_name": {
"type": "string",
"description": "User first name"
},
"last_name": {
"type": "string",
"const": "{{last_name}}"
}
}
},
"order_id": {
"type": "number",
"const": 1234
}
}
}
For guidance on structuring these parameters, you can refer to [OpenAI's Function Calling Guide]() and the [Function Calling Tutorial]() .
There's also a switch to change between parameter description or const value - both description and const value can use dynamic variables . The description will be resolved by the LLM while const value will be applied directly to the function .AI Evy
05/14/2026, 4:03 PMAI Evy
05/14/2026, 4:03 PMneerajjoshi_
05/14/2026, 4:06 PMAI Evy
05/14/2026, 4:06 PMAI Evy
05/14/2026, 4:06 PM{{variable_name}} syntax [(1) ]() .
Dynamic variables work in several areas of tool configurations :
In Custom Function URLs
In Tool Descriptions
In Property Descriptions
For custom functions specifically, when defining parameters, you can use dynamic variables in two ways :
1. In the description field - The LLM will resolve the variable
2. In the const value field - The value will be applied directly to the function
Here's an example of using dynamic variables in a parameter schema :
json
{
"type": "object",
"properties": {
"name": {
"type": "object",
"properties": {
"last_name": {
"type": "string",
"const": "{{last_name}}"
}
}
}
}
}
For implementation in production:
- **Outbound calls**: Set variables in the retell_llm_dynamic_variables field when using the Create Phone Call API
- **Inbound calls**: Supply dynamic variables in the Inbound Call Webhook
All values in retell_llm_dynamic_variables must be strings .AI Evy
05/14/2026, 4:06 PMAI Evy
05/14/2026, 4:06 PMneerajjoshi_
05/14/2026, 4:06 PMAI Evy
05/14/2026, 4:06 PMAI Evy
05/14/2026, 4:07 PM{{variable_name}} syntax [(1) ]() .
Dynamic variables work in MCP tool configurations in these areas :
- Tool descriptions
- Property descriptions
Steps to use dynamic variables with MCP:
1. Add your MCP connection - Connect your agent to the MCP server [(2) ]()
2. *Set request headers (optional) * - Define custom headers to include with the request Retell sends to your MCP Server
3. *Set query parameters (optional) * - Define query parameters to include in the request URL
4. Select the MCP tool from the list of available tools
5. *Set response variables (optional) * - Extract values from the MCP tool response and save them as dynamic variables for use later in the conversation
For example, you can extract a user's name from the response and reference it later using {{user_name}} .
Example response body:
json
{
"properties": {
"user": {
"name": "John Doe",
"age": 26
}
}
}
For implementation in production:
- **Outbound calls**: Set variables in the retell_llm_dynamic_variables field when using the Create Phone Call API [(1) ]()
- **Inbound calls**: Supply dynamic variables in the Inbound Call Webhook
All values in retell_llm_dynamic_variables must be strings .AI Evy
05/14/2026, 4:07 PMAI Evy
05/14/2026, 4:07 PMneerajjoshi_
05/14/2026, 4:39 PMAI Evy
05/14/2026, 4:39 PMAI Evy
05/14/2026, 4:39 PMAI Evy
05/14/2026, 4:39 PMAI Evy
05/14/2026, 4:39 PM{{user_number}} in the descriptions [(1) ]() .
Dynamic variables are handled on the Retell AI side, not in your MCP server code [(1) ]() [(2) ]() . When you configure the MCP node in Retell AI, you can:
1. Set query parameters - Define query parameters that include dynamic variables using the {{variable_name}} syntax
2. Set request headers - Include dynamic variables in custom headers
3. Set response variables - Extract values from the MCP tool response and save them as dynamic variables
Your MCP server's Zod schema should define the tool parameters normally, without dynamic variable syntax [(1) ]() . The dynamic variable substitution happens when Retell AI calls your MCP server, not within the MCP server itself [(2) ]() .
For example, in the Retell AI dashboard when configuring your MCP node, you might set a query parameter with a value like {{user_number}}, and Retell AI will replace that with the actual value before sending the request to your MCP server [(1) ]() [(2) ]() .