"Couldn't Find Local Tool query" Error in Chat wit...
# support
k
I've added a query tool with a 'knowledgebase' and a 'file' to lookup, added instructions to the assistant prompt on when to use it, but everytime it tries to use it, it returns the error "Couldn't Find Local Tool query". https://cdn.discordapp.com/attachments/1358374084102066316/1358374084693459064/image.png?ex=67f39bf3&is=67f24a73&hm=ab742fe1b6732da94c698695390a586bf487ca9fa926c30a65d9661455cbedc4&
v
Hi there! I see you're encountering the "Couldn't Find Local Tool query" error when your assistant tries to use your query tool. Let me help troubleshoot this issue! 👨‍💻 I notice that while I can see you've added a query tool with a knowledgebase and file lookup, I don't have specific details about your exact configuration. However, I can definitely help with common causes and solutions for this error. ## Possible Causes This error typically occurs due to several reasons: 1. **Tool Configuration Issues**: According to the information I found, this could be due to incorrect tool ID usage. One common mistake is using the tool name instead of the toolID when enabling the tool ([source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338953413886480425)). 2. **Response Format Problems**: The tool call response might not be in the correct format. The "result" field must be a single-line string without line breaks ([source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342188078437236916)). 3. **Variable Evaluation Issues**: The system might not be correctly evaluating variable paths before making the API call ([source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1321375442644762625)). ## Solutions to Try Here are some steps to resolve this issue: ### 1. Check Tool Configuration Make sure you're using the toolID instead of the tool name when enabling the tool. The correct approach is:
Copy code
// Use this (with toolID)
updateAssistant({ tools: [toolID] })

// Instead of this (with tool name)
updateAssistant({ tools: [toolName] })
### 2. Verify Prompt Instructions Explicitly integrate the tool in your prompt by clearly specifying when and how the assistant should use it. For example:
Copy code
If the user wants to know about something, use the `query` function with the parameter 'query', which will contain the user's question to initiate the process.
### 3. Ensure Correct Response Format The correct format for tool call responses is:
Copy code
json
{
  "results": [
    {
      "toolCallId": "<your-tool-call-id>",
      "name": "<your-function-name>",
      "result": "Success" // Or any success message as a single-line string
    }
  ]
}
### 4. Check Knowledge Base Configuration Verify that your knowledge base is properly configured with the correct
fileIds
and that the Knowledge Base ID is correctly associated with your assistant ([source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336051824402239579)). ### 5. Structure Your Prompt Properly Organize your prompt into distinct sections for clarity: - **Identity**: Define the assistant's role - **Context**: Emphasize staying focused and providing relevant information - **Tool Usage**: Clearly specify when and how to use the query tool - **Response Guidelines**: Provide specific instructions on how the assistant should interact Is there anything specific about your setup that you'd like me to help troubleshoot further? Sources: - [Troubleshooting "Couldn't Find Local Tool query" error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336674769055252594) - [Possible causes for "Couldn't Find Local Tool query" error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338953413886480425) - [Solutions for "Couldn't Find Local Tool query" error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342188078437236916) - [Using query tool with knowledgebase and file for lookups](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336051824402239579) - [How to properly instruct assistant prompt to use query tool](https://docs.vapi.ai/prompting-guide)
k
Thanks for the help. Can you elaborate on the 1. Tool Configuration Issues I am using the vapi dashboard to edit the assistant
@Vapi Support Bot Thanks for the help. Can you elaborate on the 1. Tool Configuration Issues I am using the vapi dashboard to edit the assistant
v
Hi there! Happy to elaborate on the Tool Configuration Issues, especially regarding toolID versus tool name when using the Vapi dashboard. 👨‍💻 Unfortunately, I don't have access to your specific dashboard configuration, but I can definitely help explain the common issues that might be causing your "Couldn't Find Local Tool query" error. ## Tool Configuration Issues in the Vapi Dashboard ### Using toolID vs. Tool Name One of the most common issues is using the tool name instead of the toolID when enabling a tool. According to information I found, when updating an assistant with a tool, using the tool name instead of the toolID can cause problems - specifically, it might create a new transient tool instead of enabling the existing one ([source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338953413886480425)). A toolID in Vapi is a unique string identifier that's used to identify a specific tool. It's often included in the initial request from Vapi and helps match the response with the corresponding tool call. ### Incorrect Tool Configuration Structure When configuring a function in the dashboard, the
toolId
property should not be present in the
tools
array. If it is, you might see error messages like:
Copy code
"message": ["assistant.model.each value in tools.property toolId should not exist"]
The correct tool configuration for a function should include: -
type
(e.g., "function") -
functionName
(the name of your function) -
async
(boolean value) - Any required parameters ### Dashboard Limitations and Bugs There are some known issues with the Vapi dashboard interface: - Adding headers to tools directly on the dashboard may not work due to a known bug - Some users have reported that the dashboard UI doesn't always save settings correctly - The dashboard only displays the 100 newest assistants, so if you have more, the one you're looking for might not be visible ### Tool Type Specification
Make sure the
type
field for each tool in the
tools
array is one of the allowed values:
Copy code
dtmf, endCall, transferCall, voicemail, output, make, ghl, bash, computer, textEditor, function
Would you like me to help you troubleshoot any specific aspect of your tool configuration in more detail? Sources: - [Using toolID instead of tool name when configuring tools in the Vapi dashboard](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338953413886480425) - [Common tool configuration issues when using the Vapi dashboard to edit assistants](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333880245681393756) - [Troubleshooting tool configuration issues specifically within the Vapi dashboard](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336715819333193740) - [TERM_QUERY: What is a toolID in Vapi?](https://api.vapi.ai/knowledge-base)
k
Thank you for reaching out to us. We've received your message and will get back to you as soon as possible.
Hi, checking if this is resolved/solved for you?
d
@Vapi Support Bot Hey, I have the same issue, and changing the name of the tool to it's id didn't help
v
Hi there! I understand you're experiencing the same "Couldn't Find Local Tool query" error and that changing the tool name to its ID didn't resolve the issue. Let me suggest some additional troubleshooting steps! 🔍 Unfortunately, I can't see your specific configuration, but I can definitely suggest other potential solutions beyond just changing the tool name to its ID. Here are some additional approaches you could try: ### 1. Check Response Format Ensure your tool call response is in the correct format:
Copy code
json
{
  "results": [
    {
      "toolCallId": "<your-tool-call-id>",
      "name": "<your-function-name>",
      "result": "Success" // Must be a single-line string without line breaks
    }
  ]
}
According to [documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342188078437236916), a common mistake is using line breaks in the "result" field or using the tool ID instead of the tool call ID. ### 2. Verify Tool Configuration Structure When configuring a function in the dashboard, make sure: - The
type
field is correctly set (e.g., "function") - The
functionName
is properly defined - The
async
parameter is set appropriately - The
toolId
property is NOT present in the
tools
array ### 3. Check Variable Evaluation According to [troubleshooting information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1321375442644762625), the system might not be correctly evaluating variable paths before making the API call. Ensure that variable substitution is set up correctly. ### 4. Try Different Model or Cluster Some users have reported success by switching to a different model like "gpt-4o" or using a different cluster instead of the real-time cluster, as mentioned in [this source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337465172263960637). ### 5. Properly Create the Tool Call
Make sure you're properly creating the tool call and not framing it as a variable instead of the value of the result variable, as noted in [this source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330221332452999321). ### 6. Check for Dashboard UI Issues There are known bugs with the Vapi dashboard interface, particularly with adding headers to tools. You might need to use the API instead of the dashboard for certain configurations. Would any of these additional troubleshooting steps be helpful for your specific situation? Sources: - [Troubleshooting "Couldn't Find Local Tool query" error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336674769055252594) - [Possible causes for "Couldn't Find Local Tool query" error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337465172263960637) - [Solutions for "Couldn't Find Local Tool query" error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342188078437236916) - [Troubleshooting tool configuration issues specifically within the Vapi dashboard](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336715819333193740)
d
@Vapi Support Bot Could the issue be that I'm using a transferCall function? I've verified its set up properly, however the "Couldn't Find Local Tool transferCall" is still displayed
v
I see you're now experiencing a "Couldn't Find Local Tool transferCall" error rather than the query tool error we were discussing earlier. This is a different issue related to the
transferCall
function. Could you please share more details about how you've configured the
transferCall
function? Specifically: 1. Are you using the Vapi dashboard or API to configure it? 2. Have you checked if there's a conflict with any server events, particularly the 'phone-call-control' event? 3. What format are you using for the phone number in the
forwardingPhoneNumber
parameter? 4. Are you using SIP for call transfers, and if so, is your system configured to handle SIP REFER messages? This information would help me provide more targeted troubleshooting steps for the
transferCall
function specifically. Sources: - [What is the transferCall function in Vapi?](https://docs.vapi.ai/call-forwarding) - [What are potential issues with the transferCall function in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330092161835733013) - [What are the solutions for the "Couldn't Find Local Tool transferCall" error in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339871158975336498)
d
@Vapi Support Bot I've used api to initially create it, and it worked flawlessly before, but after this Friday (without any changes) it stopped working. I've tried changing the agent settings in the dashboard. The only server messages I currently have is transfer-destination-request. I've used E164 format for all phone numbers in my destinations, and double-checked they are correct.
v
Thank you for providing those details about your
transferCall
function setup. Since it was working before Friday and suddenly stopped without any changes on your end, this sounds like it could be related to a recent platform update or a backend issue. A few more questions to help narrow down the problem: 1. Have you checked the call logs for any error messages beyond the "Couldn't Find Local Tool transferCall" that appears in the chat? 2. When you say you've tried changing agent settings in the dashboard, which specific settings did you modify? Did you try removing and re-adding the
transferCall
tool? 3. Are you using a custom LLM or the default Vapi-provided models? If custom, have you ensured the
transferCall
tool is included in your custom LLM tools? 4. Have you tried testing with a simple call transfer to a single destination to rule out any issues with multiple destinations or complex routing logic? Sources: - [What are potential issues with the transferCall function in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339614362742165606) - [What are the solutions for the "Couldn't Find Local Tool transferCall" error in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339871158975336498) - [How to configure the transferCall function in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335181348285054996)
d
@Vapi Support Bot I tried removing and re-adding the tool to the agent, I'm using basic vapi-provided llm (Gpt-4o-cluster), I also tried using a cluster-mini which didn't solve the issue.
v
Hi there! I see you're experiencing the "Couldn't Find Local Tool transferCall" error despite having previously working configuration. Let me help troubleshoot this issue! 🔍 Unfortunately, I can't determine exactly what might have changed on the platform since Friday, but I can suggest several troubleshooting steps specifically for the transferCall function. ## Potential Solutions to Try: ### 1. Remove the "phone-call-control" server event If you have the "phone-call-control" server event enabled, try removing it from your assistant. According to [information I found](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330092161835733013), when this event is enabled, you handle call transfers instead of Vapi, which can cause conflicts. ### 2. Ensure the transferCall tool is included in your model configuration Make sure the transferCall tool is properly defined in your model's
tools
array. For GPT-4o, you need to ensure the tool is correctly configured with the appropriate parameters. ### 3. Check the response format The correct format for tool call responses should be:
Copy code
json
{
  "results": [
    {
      "toolCallId": "<your-tool-call-id>",
      "name": "<your-function-name>",
      "result": "Success" 
    }
  ]
}
The
result
must be a single-line string without line breaks, and you should use the tool call ID instead of the tool ID, as mentioned in [this source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342188078437236916). ### 4. Try a different approach to tool configuration Since you mentioned you've already tried removing and re-adding the tool, consider: - Using the API directly instead of the dashboard for configuration - Not using "transferCall" as the tool call name (this is a [recommended tip](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1305244632124227654)) - Setting
assistantOverrides
correctly if you're using silent transfers
### 5. Check SIP REFER handling Ensure your system is configured to handle SIP REFER messages, which are often required for transferring calls. If you're using the
forwardingPhoneNumber
attribute in your API calls, try setting it to null or an empty string to see if that resolves the issue, as suggested in [this source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333634755044048979). ### 6. Consider using a Twilio number Some users have reported that using Twilio numbers for all parties involved in the call transfer resolved similar issues. Numbers purchased from Vapi might have reputation issues that could potentially block call forwarding, according to [user reports](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338285744090906756). Would any of these approaches be feasible for you to try? Also, have you noticed any error messages in your call logs beyond what appears in the chat? Sources: - [What are the solutions for the "Couldn't Find Local Tool transferCall" error in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330092161835733013) - [What are the solutions for the "Couldn't Find Local Tool transferCall" error in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342188078437236916) - [What are the solutions for the "Couldn't Find Local Tool transferCall" error in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1305244632124227654) - [What are the solutions for the "Couldn't Find Local Tool transferCall" error in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333634755044048979) - [What are the solutions for the "Couldn't Find Local Tool transferCall" error in Vapi?](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338285744090906756)
k
No it didn't work. I tried creating a new query tool with the same parameters but still encounter the same issue
k
Thank you for your patience, will get back to you when available
k
Hey KosKrit, could you share either the call ID or assistant ID so I could take a look?
k
Thank you. It works now. Even the older assistants work, so I suppose it was fixed from your end. Do you still need the assistant ID for troubleshooting?
k
Is working for you? Then, Assistant ID is not required.