Can't update tools
# support
b
Hi. When calling the PATCH API call and giving a new tool in the tools array, the API is failing because I didn't provide provider, model name, etc... Why do I have to provide these things if the assistant already has these values stored?
v
Hi @Benjamin E., I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Update Assistant]() * [Get Assistant]() * [List Assistants]() * [Create Assistant]() -----------------------------
### Answer When you attempt to update the tools array using the PATCH API call for an assistant, it is necessary to provide complete details such as the provider, model name, and other required attributes because the update operation does not automatically inherit or retain the existing settings from the previously configured assistant. The API expects each tool modification to be specified explicitly to ensure that all necessary configurations are correctly established and to prevent any unintended behaviors or configurations from being applied [(1)]() . This approach ensures precise control over the settings during updates, which is crucial in maintaining the expected performance and functionality of the assistant's tools. For more detailed information, you can refer to the documentation on updating an assistant where this behavior is outlined .
Got it. Tagging @User for additional help.
b
Hey guys. Do I really need to provide the full assistant specification when doing a patch call? This doesn't make sense and is super cumbersome.
You guys mistaken the create assistant POST call with update assistant PATCH Call
v
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
s
Yeah. Well, you can do one thing which is use the GET method and get all the configuration and use that for patch request
b
Actually, I manage to do it by doing what you said. Then I tried to add this tool to my prompt and it doesn't call it at all. It worked when using a function though.
j
Make sure to add "tool-calls" to your serverMessages
b
@Jotham I did it. I will create another ticket with more details
3 Views