mcp-server icon indicating copy to clipboard operation
mcp-server copied to clipboard

MCP Integration Bug: Tool Function Names Not Properly Exposed

Open sp2935 opened this issue 1 year ago • 4 comments

The Issue

Vapi's MCP integration creates a non-existent wrapper function instead of exposing actual MCP server tools, causing "Unknown tool" errors in production calls.

Expected vs Actual Behavior

MCP Server defines:

@mcp.tool
def get_appointment_timeslots(zip_code: str, address: str, city: str): pass

@mcp.tool  
def create_appointment(correlation_id: str, first_name: str, ...): pass

Should expose: get_appointment_timeslots and create_appointment
Vapi exposes: book_appointments (doesn't exist in MCP server)

Production Failure

AI attempted book_appointments 3 times, all failed:

// Request
{"function": {"name": "book_appointments", "arguments": "{\"action\": \"get_appointment_timeslots\", ...}"}}

// Response  
{"result": "[{\"type\": \"text\", \"text\": \"Unknown tool: book_appointments\"}]"}

Customer couldn't book appointment due to this bug.

Root Cause

Vapi incorrectly parses MCP tools/list JSON-RPC responses. Instead of exposing individual tools per the MCP specification, it creates a wrapper that doesn't exist.

Vapi's tool config shows the mismatch:

{
  "function": {"name": "book_appointments"},  // ❌ Fake wrapper
  "metadata": {
    "tools": [
      {"function": {"name": "ngrokfree-get_appointment_timeslots"}},  // ✅ Real tools
      {"function": {"name": "ngrokfree-create_appointment"}}
    ]
  }
}

Comparison

Claude Desktop (works correctly):

  • front-desk-appointment:get_appointment_timeslots ✅
  • front-desk-appointment:create_appointment ✅

Impact on MCP's Purpose

This bug defeats the entire point of MCP. The protocol exists to expose groups of related tools through a single server, but Vapi's implementation forces developers to create individual tools one-by-one instead of leveraging MCP's server-based tool discovery. This makes MCP integration pointless on Vapi.

sp2935 avatar Jul 31 '25 16:07 sp2935

Having to battle exactly the same issue. Documentation is also a false compass

raufer avatar Oct 19 '25 15:10 raufer

Having to battle exactly the same issue. Documentation is also a false compass

I opened this issue three months ago and Vapi hasn't said anything, not a single comment. On Discord you can find people who'll help with simple stuff, but there's no real channel for critical bugs like this. I'm in the Discord, I've sent emails, nothing.

I ended up building a wrapper endpoint as a workaround, but that defeats the whole point, the same MCP tools I use with other AI agents can't be used with Vapi. It's a shame.

sp2935 avatar Oct 20 '25 15:10 sp2935

I was also part of (https://github.com/VapiAI/mcp-server/pull/8) which added get_call_transcript, a feature their MCP server was missing. They ignored the pull request completely, no explanation why they won't accept it. I use that fork with get_call_transcript all the time, but it's not part of main.

I don't think they understand how open source works. They have contributors ready to help and they're not leveraging it. No one's looking at this repo.

sp2935 avatar Oct 20 '25 15:10 sp2935

@sp2935 feel free to use this https://github.com/yassinnouh-vendoroo/mcp-server

yassinnouh-vendoroo avatar Dec 30 '25 13:12 yassinnouh-vendoroo