Query tools do not accept calls to multiple knowle...
# support
g
I am checking the logs, and I have noticed that when the agent needs to call the knowledge base tool and search in more than one knowledge base like "{\"knowledgeBaseNames\": [\"check_in\", \"rates\"]}", the response is always "No answer found in the knowledge base\n". However, when only one knowledge base is used, for example {"knowledgeBaseNames": ["check_in"]}, it works correctly. Does anyone know how to retrieve information from multiple knowledge bases using the same tool with the Query Tool type? "function": { "name": "KnowledgeBaseTool_v2", "arguments": "{\"knowledgeBaseNames\": [\"check_in\", \"rates\"]}" } Response: { "name": "KnowledgeBaseTool_v2", "role": "tool_call_result", "time": 1770748744429, "result": "No answer found in the knowledge base\n", "toolCallId": "call_zBSIcLBkDyhMpWbdZgswo65m", "secondsFromStart": 76.903 }
v
To enable searching across multiple knowledge bases in the Vapi Query Tool, ensure your tool configuration includes all desired knowledge bases in the
knowledgeBases
array, like this:
Copy code
json
"knowledgeBases": [
  { "provider": "google", "name": "check_in", "fileIds": ["file-id-1"] },
  { "provider": "google", "name": "rates", "fileIds": ["file-id-2"] }
]
Also, update your assistant's system prompt to explicitly instruct it to use the tool for multi-knowledge base queries. Double-check that your function arguments and tool configuration match the documentation example for multi-knowledge base support. For more details, see the [official guide](https://docs.vapi.ai/knowledge-base/using-query-tool). Source: - [Using the Query Tool for Knowledge Bases](https://docs.vapi.ai/knowledge-base/using-query-tool)