Tool Calls Result
# support
s
Hi, does anybody know how to get the result of a tool call in the client messages. I setup my clientMessages property to listen to "tool-calls-results" but it is never called. I'm trying to get the result of a tool call into the frontend of my application.
v
@santi_racca Hello! It seems like there might be a slight mismatch in the property you're listening to. The correct property for receiving the results of tool calls in the client messages should be "tool-calls", not "tool-calls-results". Please ensure that you have "tool-calls" set up in your
clientMessages
property to listen for the results. Once you have this configured correctly, your frontend application should receive the tool call results whenever they are available. If you've already set this up and are still not receiving the results, there might be an issue with the way the tool calls are being made or how the results are being dispatched. In that case, please check your implementation for any discrepancies or errors. If you need further assistance, don't hesitate to ask for more info.
You can continue this conversation by mentioning me in the message.
s
But tool-calls only gives me the the function that was called and the arguments that were passed. I want the result of the function that was returned from my server @Vapi
v
@santi_racca I apologize for the confusion. To receive the results of a tool call, you should indeed be listening for events related to tool call results. The event name or property you need to listen to might vary based on the specific implementation of your server and client setup. Typically, the server would send the results back to the client using a specific event or message type that the client is set up to handle. If "tool-calls-results" is not triggering as expected, it's possible that there is a different event name being used or there might be an issue with the server's response format. Please double-check your server's documentation or the configuration of the messaging system to ensure you're listening for the correct event. If the documentation specifies "tool-calls-results" and it's not working, there might be an issue on the server side that needs to be addressed. If you're still having trouble, please ask support for more info on this, as they can provide specific guidance based on your server's implementation and the expected behavior of the tool call results.
s
My server is returning the correct format. I can't find the result anywhere.
s
@santi_racca can you share the associated code with it, and call id . This would really help me figure out what went wrong!
5 Views