Issue with Global Variables Not Passing in Query Parameters for Custom Function Tool

I’m using the function tool to call an external API, but I’m facing an issue when trying to pass global variables into query parameters. Here’s what I’ve done:

  1. I’m extracting variables like name and birthdate from the conversation using the “Extract Dynamic Variable” function.

  2. I then pass these values into the API Endpoint URL using query parameters, such as https://hapi.fhir.org/baseR4/Patient?name={name}&birthdate={birthdate}.

  3. However, when I run the tool, the correct arguments are retrieved, but the variables are not passed properly into the query parameters.

The function returns the error HAPI-1940: Invalid date/time/quantity format: "{birthdate}", meaning the global variables are not being interpolated in the URL as expected.

Question:

  • Is there a specific step or configuration I might be missing to ensure the global variables are correctly passed in the query parameters?

  • How can I ensure that the variables extracted in the conversation are properly inserted into the API endpoint during the function call?

Any guidance on this would be appreciated. Thanks!

Hello @Nofal_butt

You need to use the variables between double {{}}, not single {}

Try this if you still have an issue, you can share the call id and I will take a look