Eelco
06/18/2025, 11:25 AMtools
object in the model
config does not work.
Just to be clear this example is broken.
ts
{
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "... removed for brievety"
}
],
"tools": [
{
"type": "mcp",
"name": "mcpTools", // this field does not exist in the api, however a name is required
"server": {
"url": "https://actions.zapier.com/mcp/actions/"
}
}
]
}
}
It will result in this error:
ts
Body: {
"message": [
"model.each value in tools.property name should not exist"
],
"error": "Bad Request",
"statusCode": 400
}
Adding the name in the function.name
parameter allow us to save the configuration, however then the assistant fails to add and execute the mcp tools, it results in the same issue i described before, where it will literally try to call that function name on the mcp server. So it seems like the MCP tool in the model.tools
config are interpreted as regular tools, instead of being used to fetch the mcp tools and dynamically add them to the assistants tools.Vapi Support Bot
06/18/2025, 11:27 AMmodel.tools
is broken and will result in a validation error.
The only reliable workaround at this time is to add the MCP tool in the global tools section of your assistant configuration, not within model.tools
. This ensures dynamic tool injection works as expected. The documentation does not yet reflect this, so for now, avoid placing MCP tools in model.tools
and use the global tools configuration instead.
If you need further help, consider reaching out on the [Vapi Discord support channel](https://discord.gg/pUFNcf2WmH).
Source:
- [Vapi MCP Tool Documentation](https://docs.vapi.ai/tools/mcp)Aditya
06/19/2025, 3:47 AMAditya
06/19/2025, 3:47 AMEelco
06/19/2025, 2:44 PMAditya
06/23/2025, 11:18 AM