Using variables in tools
# support
i
I give the variables firstName, lastName, email and phoneNumber in the API call. This works. I see that they arrive in Vapi when I use the GET call. However, when I want to use those variables with a tool, it seems it's not always taking all of them to the tool. How can I use those variables in a tool?
v
message has been deleted
@Ivo Schipper I'm glad to hear that you're able to successfully pass variables like firstName, lastName, email, and phoneNumber to VAPI through the API call. If you're encountering issues with these variables not being consistently used by a tool, it's important to ensure that the tool you're trying to use is designed to accept these variables as parameters. To use these variables in a tool, you should: 1. Check the documentation of the tool to understand the expected parameters and their format. 2. Ensure that the variables you're passing match the expected parameter names and data types. 3. If the tool requires specific parameter names that differ from the ones you're using, you may need to map your variables to the expected parameter names before making the call to the tool. If you provide me with the specific tool you're trying to use and the context in which you want to use these variables, I can give you more detailed instructions on how to proceed.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
i
These are 3 of the 6 variables I want to send with the tool. Some are just empty, some are hallucinations, some work sometimes. It's very random. https://cdn.discordapp.com/attachments/1248276789508182076/1248277988605169704/Screenshot_2024-06-06_at_21.09.42.png?ex=666314f8&is=6661c378&hm=116a805177f7d184f2f3eb0e1d9cf174d6b664f7886487e45c10f8318399d876&
Assistant ID: 017923b2-fcc9-4b27-a85d-e78b34f58210 Tool ID: a22d7376-9555-4699-9a42-9556d1576ad6
c
It should still be the same thing.
i
What do you mean? 😄
c
The same dynamic values would be inserted in your tool.
15 Views