https://retellai.com/?utm_source=discord&utm_medium=seo logo
A tool result contains the following data:> tool_c...
# ❓・ai-evy-support
t
@AI Evy A tool result contains the following data: > tool_call_id: tool_call_479875 > > [{"date":"2025-10-16","time":"11:45","weekday":"Thursday"},{"date":"2025-10-17","time":"09:15","weekday":"Friday"},{"date":"2025-10-27","time":"09:15","weekday":"Monday"},{"date":"2025-10-27","time":"09:30","weekday":"Monday"},{"date":"2025-10-27","time":"10:15","weekday":"Monday"},{"date":"2025-10-27","time":"10:30","weekday":"Monday"},{"date":"2025-10-2 7","time":"10:45","weekday":"Monday"},{"date":"2025-10-27","time":"11:30","weekday":"Monday"},{"date":"2025-10-27","time":"11:45","weekday":"Monday"},{"date":"2025-10-27","time":"15:15","weekday":"Monday"},{"date":"2025-10-27","time":"15:45","weekday":"Monday"},{"date":"2025-10-27","time":"16:15","weekday":"Monday"},{"date":"2025-10-27","time":"16:45","weekday":"Monday"}] I want the node's prompt to only list the appointments from this tool. What's the best way to implement this in the prompt?
a
Thanks for tagging me @tacitus_16379. I'll look through relevant sources and get back to you shortly.
### Answer To have a node's prompt in Retell AI list only the appointments returned by your tool, you should use dynamic variables that reference the tool's output. When your tool returns appointment data, you can inject this data into the prompt using the double curly braces syntax for dynamic variables, such as {{appointments_list}}. The variable must be set with the formatted appointment data before the agent prompt is rendered [(1) ]() . You would: 1. Transform the tool's result (the array of appointments) into a string listing the appointments in your backend or function. 2. Pass this formatted string as a dynamic variable (e.g., "appointments_list") when you trigger the node. 3. Reference it in your prompt like:
Copy code
Here are the available appointments:
{{appointments_list}}
This makes the prompt display only the appointments from your tool for that node .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
@User How should the the array of appointments look like?
@AI Evy How should the the array of appointments look like? Give me an example, please.
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer To use the appointment data in a Retell AI prompt, you need to format the array of appointments as a string before passing it as a dynamic variable (e.g., appointments_list) . The documentation shows dynamic variables are always passed as key-value pairs of strings. For example:
Copy code
json
{
  "appointments_list": "Thursday 2025-10-16 11:45\nFriday 2025-10-17 09:15\nMonday 2025-10-27 09:15\nMonday 2025-10-27 09:30"
}
In your prompt, you would then reference it as:
Copy code
Here are the available appointments:
{{appointments_list}}
This ensures the prompt lists only the appointments from your tool, formatted as you want them to appear to the user [(1) ]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.