Assistant doesn't use the tool result
# support
p
I have a custom tool with oauth credentials set up in vapi. I can see proper requests and responses on my backend side. However in the vapi dashboard I can see something like this in message tab: "name": "getSubmissionDetails", "role": "tool_call_result", "time": 1760989282966, "result": "Success.", "toolCallId": "call_...", "secondsFromStart": 5.468 and the assistant doesn't use the information provided by the tool. The response of my server to tool request is this: {"results":[{"toolCallId":"call_...","result":"here's a plain text string of the response"}]}
what is the proper way to use custom tools in calls?
v
Check for line breaks in your tool result string. The result must be a single-line string—line breaks (
\n
) will cause the assistant to ignore the tool output. For example, instead of:
Copy code
json
{"results":[{"toolCallId":"call_...","result":"Line 1\nLine 2"}]}
return:
Copy code
json
{"results":[{"toolCallId":"call_...","result":"Line 1, Line 2"}]}
Make sure your server always returns HTTP 200 and the result is a single-line string. This should allow the assistant to use the tool result in conversation. See more: [Custom tools troubleshooting](https://docs.vapi.ai/tools/custom-tools-troubleshooting) Source: - [Custom tools troubleshooting](https://docs.vapi.ai/tools/custom-tools-troubleshooting)
p
No line breaks there, simple plain text string
c
Hey, Could you provide the call ID where you experienced this issue? We want to review the logs to identify the cause.
2 Views