Vapi recieves "No result returned." in tool despit...
# support
i
I have this very simple make flow that it runs with the time function I created. It runs great and apparently it sends the data correctly. Yet when I ask for the time there is no result. I don't know what I'm doing wrong. It's contradictory. I get this: { "name": "Time", "role": "tool_call_result", "time": 1721683322376, "result": "No result returned.", "toolCallId": "call_5zqt", "secondsFromStart": 6.803 } How does this make sense? https://cdn.discordapp.com/attachments/1265057700845326408/1265057701520605344/image.png?ex=66a0204b&is=669ececb&hm=ae381e9cd193df4cf354d4c3e3408f4ccdb6038d639651321774f65f2f8b8cc9& https://cdn.discordapp.com/attachments/1265057700845326408/1265057701784981514/image.png?ex=66a0204b&is=669ececb&hm=ffc5a64679e2da6462f0ece29166a7145fba501e2b8e677aa2cc71168f5fa896&
v
@Ian It seems like there might be an issue with how the time function is implemented or how the result is being handled after the function executes. The JSON response indicates that the function is being called and it's running for a certain duration (6.803 seconds), but it's not returning the expected result. To assist you further, I would need to know more details about the time function you've created. Could you please provide more information about how the function is supposed to work and how you're calling it? This will help me understand the problem better and provide you with a more accurate solution.
You can continue this conversation by mentioning me in the message.
This is my full vapi function
@Vapi
v
@Ian It seems there might have been a misunderstanding or a technical issue, as I haven't received the details of your VAPI function. Could you please try sending the information about your VAPI function again? This will help me understand how it's supposed to work and what might be going wrong with the result handling.
v
@Ian I'm here to help, but it appears there might be an issue with the messages you're trying to send. If you're attempting to share the details of your VAPI function, please ensure that the message contains the relevant information or code snippet. If there's a file or a code block you'd like to share, please paste the text directly into the message so I can assist you further. If you're encountering technical difficulties, please ask support for more info on this.
i
My tool name is called Time and the description is just that the function is called when user asks for time. The tools is being called correctly. Make also sends the request back to vapi but i still get the no result returned for some reason @Vapi
v
@Ian It sounds like your Time tool is being triggered correctly, but the issue seems to be with the response that Make (formerly Integromat) is sending back to VAPI. The response you're receiving indicates that the tool is not returning the expected time result. Here are a few steps you can take to troubleshoot this issue: 1. **Check the Time Function Implementation**: Ensure that the Time tool is correctly implemented on your server and that it's capable of returning the current time in the expected format. 2. **Verify the Response Format**: The response from your server should match the expected JSON format that VAPI can understand. For a tool call, it should look something like this:
Copy code
json
{
  "results": [
    {
      "toolCallId": "call_5zqt",
      "result": "The current time is 12:34 PM"
    }
  ]
}
Make sure that the
result
field contains the actual time value you want to return. 3. **Inspect the HTTP Request and Response**: Check the logs for the HTTP request from Make to your server and the response from your server to Make. This will help you verify that the correct data is being sent and received. 4. **Review Make Configuration**: Ensure that the Make scenario is configured to handle the response correctly and that it's mapping the result back to VAPI as expected. If you've verified all of the above and the issue persists, there might be a more specific problem with the integration. In that case, please provide more detailed information about the Time tool's implementation and the Make scenario configuration, so I can offer more targeted assistance. If you're unable to share these details here, you may need to reach out to support for further help.
i
@Vapi but should i hardcore the toolcallid?
v
@Ian No, you should not hardcode the
toolCallId
. The
toolCallId
is a unique identifier for each call made to your tool, and it should be dynamically obtained from the incoming request and then included in the response. This ensures that the response is correctly associated with the request that was made. When your Time tool receives a request from VAPI, it should include a
toolCallId
. Your tool should process the request, obtain the current time, and then send back a response with the same
toolCallId
it received. This way, VAPI can match the response to the correct request. Here's a simplified example of how the response should be structured:
Copy code
json
{
  "results": [
    {
      "toolCallId": "<DYNAMICALLY_RECEIVED_TOOLCALLID>",
      "result": "The current time is 12:34 PM"
    }
  ]
}
In your implementation, make sure to replace
<DYNAMICALLY_RECEIVED_TOOLCALLID>
with the actual
toolCallId
you received in the request. This is typically done programmatically within your Time tool's code. If you need further assistance with the implementation, please provide more details about your Time tool's code or the platform you're using, and I'll do my best to guide you through the process.
s
@Ian please return the response in expected format.
Copy code
json
{
    "results": [
        {
            "toolCallId": "X",
            "result": "Y"
        }
    ]
}