https://retellai.com/?utm_source=discord&utm_medium=seo logo
How do i test a function in a multi-prompt agent b...
# ❓・ai-evy-support
c
@AI Evy How do i test a function in a multi-prompt agent by itself, without having to go through the the entire workflow or making a call?
a
Thanks for tagging me @CG. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, I don't have specific information about testing a custom function in isolation within a multi-prompt agent without going through the workflow or making a call. The documentation covers how to create and configure custom functions (setting up the endpoint URL, parameters, headers, etc.) [(1) ]() , but doesn't detail a standalone function testing feature within the dashboard. Check out these potentially useful sources: - [Integrate any system with custom function]() - [Single/Multi Prompt Agent Overview]() - [Build a multi-prompt agent]() For direct assistance on testing functions independently, you can: - Visit [Contact Sales]() - Check the [Retell AI GitHub]() Would you like me to provide a general answer based on common approaches to testing webhook/function endpoints outside of the platform?
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @CG. I'll get back to you soon.
c
Ok @AI Evy I have another question. I keep getting this error "Result: Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400 response status: 400 response data: [{"status":400,"message":"1"},"\"start_date\" format is invalid. Must be YYYY-mm-dd like (2025-12-22)"]" how do I get the format correct?
a
### Answer The error message tells you exactly what format is expected:
YYYY-mm-dd
(e.g.,
2025-12-22
) . [(1) ]() To fix this, ensure the
start_date
parameter in your custom function is being passed as a string in that exact format. In your function's parameter schema, you can define it like this:
Copy code
json
{
  "type": "object",
  "properties": {
    "start_date": {
      "type": "string",
      "description": "The start date in YYYY-mm-dd format (e.g., 2025-12-22) "
    }
  },
  "required": ["start_date"]
}
Adding a clear description helps the LLM extract and format the date correctly from the conversation. If the LLM is still passing an incorrectly formatted date, you can also update your prompt to explicitly instruct the agent to format dates as
YYYY-mm-dd
before calling the function.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
I'm doing a GET function and i'm building a multi-prompt agent. Where should i put the description in my custom function? if i place the variable between curly brackets will it de denoted as a string or do i need to put it in quotes?
@AI Evy I'm doing a GET function and i'm building a multi-prompt agent. Where should i put the description in my custom function? if i place the variable between curly brackets will it de denoted as a string or do i need to put it in quotes?
a
Thanks for the follow-up, @CG. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Custom Function Not substituting variable](https://discord.com/channels/1186424376300679209/1450867178906714123) ​
### Answer --- For a GET request in a custom function, you can define query parameters with either a description (resolved by the LLM) or a const value (applied directly) . [(1) ]() Where to put the description: In the query parameters section, there's a switch to toggle between "parameter description" or "const value." Use the description field when you want the LLM to extract and resolve the value from the conversation. Dynamic variables and curly brackets: Dynamic variables use double curly brackets like
{{variable_name}}
. [(2) ]() When you use
{{variable_name}}
in a const value or query parameter, it will be substituted with the actual value at runtime—you don't need to add extra quotes around it. [(1) ]() For example, in a parameter schema:
Copy code
json
"last_name": {
  "type": "string",
  "const": "{{last_name}}"
}
Important: The
{{variable_name}}
must reference an existing dynamic variable that has been set (either via the API call, inbound webhook, or extracted during the conversation) . If the variable doesn't have a value, it won't be substituted. [(2) ]() , [(3) ]() If you need the LLM to extract a value during the conversation, use the Extract Dynamic Variables function to capture it first, then reference it with
{{variable_name}}
in your query parameters.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy I’m running into a confusing issue with a GET custom function and date parameters for availability, and I’d really appreciate your help debugging how Retell is building the HTTP request. ### Context I’ve built a multi-prompt agent using Juvonno as the EMR. One of my custom HTTP functions is: - Name:
juvonno_get_availability
- Purpose: get appointment availability from Juvonno - Method:
GET
- Usage: called from
State4_booking_calendar
to find slots for a given day (e.g. “tomorrow at 12 pm”, “Friday at 2 pm”). When I don’t pass any dates, the function returns availability (Juvonno seems to use some default date like
2025-12-22
). But when I try to pass
start_date
and
end_date
so we can search specific days, the API responds with a 400 error saying the date format is invalid – even though the date string looks correct. I’d like help understanding exactly how Retell is mapping function “Arguments” → HTTP query parameters for this GET request, and how I should configure it so Juvonno accepts the dates. --- ### What works (no dates,
Arguments: {}
) In this scenario, my custom function is defined as a GET with no explicit query params configured. Melina calls: ```text Calling tool: juvonno_get_availability Arguments: {} And Juvonno responds successfully with a huge list of slots keyed by "2025-12-22" (this is the behavior I want, but for whatever date the user actually requested): Result: {"list":[ { "staff":{"id":5,"num":"5","first_name":"3D BODY SCAN","last_name":"THERAPY"}, "slots":{"2025-12-22":[ {"available":true,"time":{"time":"10:00","meridiem":"am","interval":10}, "schedule_type":{"code":"11","name":"3D Body Scan","id":8}}, ... ]} }, ... ]}
a
Thanks for the follow-up, @CG. I'll get back to you soon.
s://docs.retellai.com/build/single-multi-prompt/custom-function)
Copy code
json
{
  "type": "object",
  "properties": {
    "start_date": {
      "type": "string",
      "description": "The start date in YYYY-mm-dd format (e.g., 2025-12-22) "
    }
  }
}
Bottom line: For GET requests with LLM-extracted parameters, the most reliable approach is to use a POST request to capture the data first, then handle the actual GET request to Juvonno from your backend. [(2) ]()
### Answer --- Based on the documentation and community discussions, here's how Retell maps function arguments to HTTP query parameters for GET requests, and how to configure your dates correctly: How query parameters work in GET custom functions: For GET requests, you define query parameters in the custom function configuration. There's a switch to toggle between "parameter description" (resolved by LLM) or "const value" (applied directly) . Both can use dynamic variables. [(1) ]() The issue with GET requests and dynamic parameters: There's a known limitation: when using GET requests with dynamic variables like
{{start_date}}
in query parameters, the variable may be passed literally (e.g.,
?start_date=%7B%7Bstart_date%7D%7D
) rather than substituted with the actual value. This happens because the dynamic variable doesn't have a value set at the moment the request is made. [(2) ]() Recommended workaround: 1. Use a POST request instead to extract the date values first, then either: - Send the data to your backend/webhook (n8n, Make, etc.) and have it make the GET request to Juvonno with the properly formatted dates - Return the extracted values as dynamic variables, then use a second function with those variables 2. Extract the dynamic variable first using the Extract Dynamic Variables function to capture and store
start_date
and
end_date
from the conversation before calling your availability function. Then reference them with
{{start_date}}
in your query parameters. For the date format itself: Ensure your prompt explicitly instructs the agent to format dates as
YYYY-mm-dd
(e.g.,
2025-12-22
) before calling the function, and define the parameter description clearly: [(1) ](http
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] How to pass query URL parameters from conversation to GET request](https://discord.com/channels/1186424376300679209/1384523020110008420) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.