RyGuy
10/30/2025, 11:22 PMknowledge_base
2. get_available_appointment_slots
3. schedule_appointment
However, when I ask the assistant a question that should trigger get_available_appointment_slots, it instead calls the generic function name mcpTools.
Here’s what I’m seeing in the end-of-call-report webhook data:
json
"toolCalls": [
{
"id": "call_EdJTABIfAJ3Td03qGiEUioHt",
"type": "function",
"function": {
"name": "mcpTools",
"arguments": "{}"
}
}
]
Even though my MCP server correctly registers the tools using server.registerTool('get_available_appointment_slots', ...), VAPI only sends calls to the MCP under the generic function name (mcpTools).
Here’s the key part of my assistant’s configuration:
json
"model": {
"model": "gpt-4o",
"tools": [
{
"type": "mcp",
"server": {
"url": mcpServerUrl,
"headers": {
"x-team-id": team_id,
"x-mcp-tools": enabledTools,
"x-assistant-id": assistant_id
},
"timeoutSeconds": 20
},
"function": { "name": "mcpTools" },
"metadata": { "protocol": "shttp" }
}
]
}
This problem only happens when attaching my MCP via the API.
If I create the same MCP through the VAPI dashboard UI, everything works as expected — the assistant correctly calls get_available_appointment_slots.
So my question is:
How do I configure my assistant so that it calls the tool names defined in my MCP server (e.g., get_available_appointment_slots) instead of the wrapper function name (mcpTools)?RyGuy
10/31/2025, 1:50 AMVercel
10/31/2025, 3:47 PMRyGuy
10/31/2025, 4:53 PMenabledTools variable is a JSON array. See below:
const enabledTools = JSON.stringify(["booking"])
That allows me to conditionally return both get_available_appointment_slots and book_appointment tools based on the user's privileges using the assistant.
My custom headers are working just fine, but I think you're correct that my MCP server isn't listing the tools when created via the API. However, it works just fine if I create a global MCP server and manually add it to my assistant.Vercel
10/31/2025, 5:27 PMChiranjeet Mishra
11/03/2025, 8:25 PMhttps://mcp.vapi.ai/mcp for streamable HTTP.
2. **Authorization**:
- Use your Vapi API key as a bearer token for authentication. Example for Claude Desktop would look like:
json
{
"mcpServers": {
"vapi-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.vapi.ai/mcp",
"--header",
"Authorization: Bearer ${VAPI_TOKEN}"
],
"env": {
"VAPI_TOKEN": "YOUR_VAPI_API_KEY"
}
}
}
}
3. **Creating and Using Tools**:
- Vapi MCP Server provides tools like list_assistants, create_call, etc., which can be integrated and used to manage assistants and calls via your assistant or client.
For a complete setup tutorial and examples, check out [this guide on Vapi's MCP Server](https://docs.vapi.ai/sdk/mcp-server).
If you follow these steps and need further customization or run into issues, make sure your server URL and API key configurations are correct. Additionally, you can explore detailed setup examples in different programming languages from the [MCP integration documentation](https://docs.vapi.ai/cli/mcp).mao
11/10/2025, 7:47 PMmao
11/10/2025, 7:48 PMRyGuy
11/10/2025, 8:27 PMChris
11/14/2025, 9:43 AM