Query tool error: Cannot read properties of undefi...
# support
u
I've been trying ot add a query tool with a database to my vapi assistant but it always fails and this message pops up, I've tried diferent document formats, making a completely new assistant with only that tool, nothing seems to work, if someone knows a solution or knows how to fix this I'd love to hear from you. https://cdn.discordapp.com/attachments/1444804545031962788/1444804545241682070/image.png?ex=694e5756&is=694d05d6&hm=54519b7bf426ff333a781b96bc04636d12df149dcf873dc183f09f2e89fef490&
c
Hi there, Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST). We’ll get back to you as soon as possible during our normal business hours. If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly. Warm regards, Vapi Customer Support Team
v
Thanks for sharing the error details. To help diagnose the "Cannot read properties of undefined (reading 'message')" issue, could you please share a sample of the JSON response your query tool returns (with sensitive data removed)? Tip: According to the documentation, the response must include a
results
array with objects containing both
toolCallId
and either a
result
or
error
field as single-line strings, and the HTTP status should always be 200. Reviewing your actual response will help pinpoint any format issues ([see troubleshooting guide](https://docs.vapi.ai/tools/custom-tools-troubleshooting)). Source: - [Custom tools troubleshooting](https://docs.vapi.ai/tools/custom-tools-troubleshooting)
u
It doesnt return any json, just that error message
m
I have the exact same problem, I have this bug when I try to use the default knowledge base through the web dashboard. I tried to : -use it directly (by simply adding files under my system prompt) -use it through a tool in both cases, I get this error (I get it all the time) : I get this error when testing my agent online, and in my test suites as well. Here is my call transcript in my tests, when the ai tries to fetch the tool that uses the default knowledge base for example : AI: tool_calls: {"name":"knowledge_base_search","arguments":"{\"knowledgeBaseNames\": [\"knowledge_base\"]}"} AI: Cannot read properties of undefined (reading 'message') AI: tool_call_results: "Cannot read properties of undefined (reading 'message')" I tried removing files from my knowledge base and adding just one back, but the error persists.
c
Hi, Thanks for the details — this is a known bug with the Query Tool in chat. There isn’t an ETA on a fix yet, but our team is actively working on it. If you’re seeing similar issues when using the Query Tool during calls, please share a call ID and we can review the logs on our side. Best, Vapi Support