sad-indigoS
VAPI2mo ago
sad-indigo

Assistant Using mcpTools Instead of Custom MCP Tool Names

I created an assistant via the API with a custom MCP server. My MCP has 3 tools:
  1. knowledge_base
  2. get_available_appointment_slots
  3. schedule_appointment
When I ask for availability (hoping for it to use get_available_appointment_slots, it’s calling the function name mcpTools instead of get_available_appointment_slots despite instructions in the system prompt to use get_available_appointment_slots.

After reviewing the
end-of-call-report
webhook data, I can see it’s using the wrong function name in the toolCalls. See below:



{"toolCalls": [
      {
        "id": "call_EdJTABIfAJ3Td03qGiEUioHt",
        "type": "function",
        "function": {
          "name": "mcpTools",
          "arguments": "{}"
        }
      },
      {
        "id": "call_1bsemJNPsJuWCcNeMHHWOtqv",
        "type": "function",
        "function": {
          "name": "mcpTools",
          "arguments": "{}"
        }
      }
    ],
    "role": "tool_calls",
    "message": "",
    "time": 1761844411824,
    "secondsFromStart": 26.659
},


Here is the assistant’s configuration:

"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"
        }
      }
],


Am I doing something wrong? How do I make sure my assistant is calling the tools listed in my MCP server rather than the function name I gave my MCP server?

callId = 019a361b-d3e9-7882-924a-bec9b3eb7544
orgId = ae6fdc9a-4e2a-4f61-b4f6-e4da9aa7b825
Was this page helpful?