https://retellai.com/?utm_source=discord&utm_medium=seo logo
r
@AI Evy - For Cal.com custom tools, is there a way to pass the Event Type ID during the call? As in can I actually use a dynamic variable in Event Type ID field in the "Check Calendar Availability" function and then pass that dynamic var during call? Is that supported? Are dynamic vars generally supported in functions/tools/mcps?
a
Thanks for tagging me @Rakshit Kalra. I'll look through relevant sources and get back to you shortly.
### Answer Yes, dynamic variables are supported in functions and tools. You can use dynamic variables in custom function configurations, including in fields like Event Type ID. [(1) ]() [(2) ]() Dynamic variables work in several places within tool configurations: [(1) ]() - Custom function URLs - Tool descriptions - Property descriptions - Request headers (can be static or include dynamic variables) [(2) ]() - Query parameters (both description and const value can be dynamic variables) For your Cal.com use case, you can define a dynamic variable like
{{event_type_id}}
in the Event Type ID field of your Check Calendar Availability function. [(1) ]() Then pass the actual value when creating the call through the
retell_llm_dynamic_variables
field in the API request. For example, when making an outbound call, you'd include:
Copy code
json
{
  "retell_llm_dynamic_variables": {
    "event_type_id": "your_event_type_value"
  }
}
All values in
retell_llm_dynamic_variables
must be strings. Regarding MCP tools specifically, the documentation confirms you can set query parameters for MCP configurations, [(3) ]() which would support dynamic variable usage in that context as well.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] MCP](https://docs.retellai.com/build/single-multi-prompt/mcp) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.