add multiple tools
# support
y
i want to add multiple tools of same type in an assiatent and want to call each one on specific decision how to provide that to assistant as it calls first tool of same type always not calls another tool even specifying with different names
v
To add multiple tools of the same type and ensure your assistant calls the correct one, give each tool a unique function name and reference that name in your tool call. For example:
Copy code
json
"tools": [
  {
    "type": "function",
    "function": { "name": "get_weather_ny", ... },
    "server": { "url": "https://your-api.com/weather/ny" }
  },
  {
    "type": "function",
    "function": { "name": "get_weather_sf", ... },
    "server": { "url": "https://your-api.com/weather/sf" }
  }
]
When making a tool call, specify the exact function name you want to invoke. This should help the assistant select the correct tool, as long as each has a unique name and is referenced properly in your logic. If the assistant still always calls the first tool, double-check that your tool call payload uses the correct function name. Source: - [Vapi Docs: Custom Tools](https://docs.vapi.ai/tools/custom-tools)
k
Give each a unique name and description, clearly define their use in the system prompt, and the assistant will select the correct one based on context..
2 Views