Vapi custom tool
# support
u
Hi, I created an API server that does calendar appointments for my application, the bot makes the tool call and I'm outputting the result but the bot keeps saying no timeslots available Assistant ID: The vapi assistant ID is 65a9ad1f-88eb-41b3-93ac-c05de322201b I've modified the response to be test, JSON or stringified JSON Attempt 1: plain text Extracted options: { timeMin: '2023-10-28T00:00:00Z', timeMax: '2023-10-28T23:59:59Z', timeZone: 'America/New_York' } Tool call ID: call_nQgfmNDAIYRJNRNuevym1IR5 SENDING RESPONSE: { "toolCallId": "call_nQgfmNDAIYRJNRNuevym1IR5", "result": "slot available for 2 - 4 PM" } Attempt 2: stringified json SENDING RESPONSE: { "toolCallId": "call_NIASqDZjSFczlpWaZsEvw8LJ", "result": "{\"availableSlots\":[{\"start\":\"2023-11-02T09:00:00-04:00\",\"end\":\"2023-11-02T14:00:00-04:00\"},{\"start\":\"2023-11-02T12:30:00-04:00\",\"end\":\"2023-11-02T14:30:00-04:00\"},{\"start\":\"2023-11-02T13:00:00-04:00\",\"end\":\"2023-11-02T15:00:00-04:00\"},{\"start\":\"2023-11-02T13:30:00-04:00\",\"end\":\"2023-11-02T15:30:00-04:00\"},{\"start\":\"2023-11-02T14:00:00-04:00\",\"end\":\"2023-11-02T16:00:00-04:00\"},{\"start\":\"2023-11-02T14:30:00-04:00\",\"end\":\"2023-11-02T16:30:00-04:00\"}]}" } Attempt 3: normal json SENDING RESPONSE: { "toolCallId": "call_BLMPFIpaWFZSUTZwH6p9yJ8E", "role": "tool", "result": [ { "start": "2023-11-01T09:00:00-04:00", "end": "2023-11-01T11:00:00-04:00" }, { "start": "2023-11-01T13:00:00-04:00", "end": "2023-11-01T15:00:00-04:00" }, { "start": "2023-11-01T13:30:00-04:00", "end": "2023-11-01T15:30:00-04:00" }, { "start": "2023-11-01T14:00:00-04:00", "end": "2023-11-01T16:00:00-04:00" }, { "start": "2023-11-01T14:30:00-04:00", "end": "2023-11-01T16:30:00-04:00" } ] } But I keep getting the same message from the bot, that no slots are available
k
Looking into it
u
Thanks
@kingFixed it, I was not sending the response in results array, I was just sending it like {toolcallid:, result:}s_big01
s
Marking this ticket as Solved ✅